Prism shell 模板,正在创建 ShellView 的两个实例
我开始进行更改和修改,现在应用程序启动了两次。
protected override DependencyObject CreateShell()
上述覆盖仅调用一次。 ShellView
中的构造函数被调用两次。一次用于默认构造函数,一次用于采用 ShellViewModel 实例的构造函数。
不确定到底是什么原因造成的,但我的预感是某些内容被无意中修改了,并且等待着一个简单的解决方案......
Started with a default Prism Shell project and all was working as expected.
I began making changes and modifications and now the application is started twice.
protected override DependencyObject CreateShell()
The above override is only called once. The constructor(s) in the ShellView
are being called twice. Once for the default constructor and once for a constructor taking an instance of the ShellViewModel
.
Not sure what exactly is causing this however my hunch is that something was inadvertently modified and a trivial solution awaits...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
StartupUri
已设置;我相信这是在使用 Expression Blend 打开解决方案时发生的。StartupUri
was set; my belief is that this happened when opening the solution with Expression Blend.