Change default access modifier for controls created in UI designer

前端 未结 2 829
既然无缘
既然无缘 2021-01-20 20:44

I\'m creating winforms using visual inheritance. In order to be able to manipulate inherited UI controls in child classes I need to set the controls in the base classes to

相关标签:
2条回答
  • 2021-01-20 21:00

    Working with WinForms for a couple of years, but without knowing everything that is possible (who can?), what you want to achieve is not possible. You'll have to do it manually. For my own purpose, how would you want it to be feasible? Which kind of options are you expecting that will help you achieve your goal that is really application specifics. Do you want the possibility to set all the controls on a form with protected access modifier? If it is the case, I think that we should discuss more about design. If not, then you'll have to set them manually.

    0 讨论(0)
  • 2021-01-20 21:02

    Please go to properties and then modifiers change private to protected. This image hopefully help you. properties->modifiers->protectes

    0 讨论(0)
提交回复
热议问题