Silverlight 打开子窗口计数器
我有一个 silverlight 应用程序,它使用子窗口作为处理对话框。可以从多个事件调用打开的子窗口。
我想做的是向 Child Window Show() 添加一个计数器,每次调用时该计数器都会加一。这样,如果计数器为零,我应该只能调用 Close()。这将允许所有已完成的事件运行并调用 Close() 并在每次调用时将值减一。
老实说,我不知道从哪里开始,但任何帮助或指导都会很棒。
谢谢
I have a silverlight application which uses a child window as a processing dialog. The child window open can be called from more that one event.
What I would like to do is to add a counter to the Child Window Show() that increments by one on each call. That way, I should then be able to only call the Close() if the counter is at zero. This would allow for all the completed events to run and call a Close() and decrement the value by one with each call.
To be honest I'm not sure where to start with this one but any help or guidance would be great.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它不是 100% 清楚您想要完成的任务,但检索所有打开的子窗口对象的一个好方法是以下方法:
请注意,此方法自 Silverlight 4.0 版起可用,祝
您好运。
Its not 100% clear what you are trying to accomplish, but a good way to retrieve all your opened childwindow objects is the following method :
Note that this is available since Silverlight version 4.0 only
Good luck.