在UI设计创建的控件更改默认的访问修饰符 [英] Change default access modifier for controls created in UI designer

查看:108
本文介绍了在UI设计创建的控件更改默认的访问修饰符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建使用可视化继承的WinForms。为了能够操纵子类继承的UI控件,我需要在基类设置控件保护辅助,而不是私人。我可以手动做到这一点,但希望能够改变我工作的解决方案中的默认行为。这是可能的>

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 protected accessibility instead of private. I can do this manually, but would like to be able to change the default behavior for the solution I'm working on. Is this possible>

推荐答案

用的WinForms了几年的工作,但不知道一切是可能的(谁可以?)你想达到什么是不可能的。你必须做手工。对于我自己的目的,你会如何想它是可行的?哪一种选择,你希望这将帮助你实现你的目标是真正的应用程序细节。你想的可能性,设定保护的访问修饰符窗体上的所有控件?如果是的话,我认为我们应该多讨论设计。如果没有,那么你就必须手动设置。

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.

这篇关于在UI设计创建的控件更改默认的访问修饰符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆