简体   繁体   中英

Enabling/Disabling menu items

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 ac# winforms application.

这里有一篇很好的文章: http//msdn.microsoft.com/en-us/magazine/cc188928.aspx

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM