规则10:添加窗体属性(Add Form Properties) 正如我已经提到过的,当你需要为你的窗体添加数据时,请添加一个私有域。如果你需要访问其他类的数据,可以为你的窗体添加属性。
基于24个网页-相关网页
如果您将属性值添加到窗体及其控件的属性表,则Visual Studio会在幕后于一个已编译为非特定程序集的资源文件中维护它们。
As you add property values into the property sheet for the form and its controls, Visual Studio maintains them in a resource file behind the scenes that is compiled into the neutral assembly.
特别是,Visual Studio需要添加代码来加载正确的本地化资源,并将它们的值分配给窗体和控件属性。
In particular, Visual Studio adds code to load the correct localized resources and assign their values to form and control properties.
将控件添加到组件栏后,选定该组件并设置其属性,其方法与设置窗体上的任何其他控件的方法相同。
Once a control has been added to the component tray, you can select the component and set its properties as you would any other control on the form.
应用推荐