开发者

Enabling/Disabling menu items

开发者 https://www.devze.com 2023-03-29 14:31 出处:网络
For any windows application there is a requirement to enable or disable menu items and buttons 开发者_运维问答based on certain properties of a selected object. What are the design patterns you have em

For any windows application there is a requirement to enable or disable menu items and buttons 开发者_运维问答based on certain properties of a selected object. What are the design patterns you have employed to do that? I am currently developing an application that contains a number of projects and will require hundreds of menu items to change based on specific properties of each project. I am thinking to have a method that essentially goes through each menu item and checks the project properties. Any other ideas to suggest?

Just to clarify, I am talking about a c# winforms application.


There's a nice article about it here: http://msdn.microsoft.com/en-us/magazine/cc188928.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消