I add an Usercontrol base class
my Base Class
public class UserControlBase : UserControl
{
protected IAppLogic app;
public MainWindow CurrentWindow{
get{
return (App.Current.MainWindow as MainWindow);
}
}
public UserControlBase()
{
var _app = IoC.Kernel.Get<IAppLogic>();
this.app = _app;
}
public void MainNavigate(Pages.PageBase p)
{
CurrentWindow.MainFrame.Content = p;
}
}
but the design does not shown
Browsing around some of the other questions, I found some of the reasons this can happen
if(!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
{
//code producing exception
}
Please share the stacktrace for us to help more.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.