开发者

Show constant string for the color in form designer

I am working in .Net 2010 framework 2.0

I want to place the constant string for a color property in form designer like GradientBeginColor = MyColor i开发者_StackOverflow社区n form designer.

How can i achieve that?


As far as I know, It is not possible to do in the designer, you'll have to set it in the code of the form.

For example in the new() constructor after InitializeComponent() or In Form_Load

Another option you have is to store it as an Application Setting. In the Data section of the Properties Window, Click the arrow next to (Application Settings) then in (PropertyBinding) choose the browser ellipse (...) and on the GradientBeginColor create a new Setting. Then you can change the setting in the settings file to match the value of myColor. You could even use this setting on other forms.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜