2011-02-11 77 views
0

我在WPF中創建UserControl,但它不直接從UserControl類繼承。我的基類的東西如下圖所示WPF UserControl繼承自定製UserControl類不工作

public class MyUserControlBase: UserControl, IMyInterface1, IMyInterface2 
{..} 

現在,在我的用戶的項目,我已經改變了用戶控件類簽名

FROM

public partial class MyUserControl: UserControl //This is by default when the project was created. 

TO

public partial class MyUserControl: MyUserControlBase 

但出錯「部分聲明的'UI.MyUserControl'不能指定不同的基類」。

請建議我必須改變以使其運行。

回答