如何在 cal(prism) 框架中的另一个区域内重用复合 UserControl?
我在应用程序中使用 CAL 框架,并且需要在其他地方重用复合 UserControl,即为下一个区域创建该用户控件的新实例,并根据UIContext。
当我尝试这样做时,我得到一个例外,它的孩子已经被注册。
任何这方面的示例代码将不胜感激。
I'm using CAL framework in my application and I came to a point where I needed to re-use my composite UserControl somewhere else, i.e. would create a new instance of that usercontrol for the next region and change some of it's properties as per the UIContext.
When I tried to do so, I got an exception that it's children have already been registered.
Any sample-code in this regard would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
出现了一个小故障。 CAL 无法灵活地重用复合用户控件。我最终必须创建一个基本 UI,然后从中派生两个不同的复合用户控件类。
There was a glitch. CAL is not that flexible to re-use composite usercontrols. I had to finally create a base UI and then derrived two different composite usercontrol classes from it.