利用VS.Net设计师绑定自动更新应用程序设置 [英] Automatically update the Application Setting using the binding from VS.Net Designer
问题描述
这是可能的使用设计属性绑定到现有的应用程序设置,这样,我没有写东西像
It's possible to bind a property to an existing application setting using the designer, that way I don't have to write something like
textBox.Text = Settings.Default.Name;
初始化自己的状态时,
when initializing my form.
现在。它看起来像结合停在那里,也就是说,如果我改变我的设定值时,它不会更新我的文本框中的值,反之亦然。
Now it looks like the binding stops there, ie if I change the value of my setting, it won't update the value in my textbox and vice versa.
这是正常的还是我失去了一些东西?
Is it normal or am I missing something?
推荐答案
我来解释我是如何做到这一点与Visual Studio 2010中Windows窗体很可能在新版本中类似。
I'll explain how I do it on windows forms with Visual Studio 2010. It is likely similar in newer versions.
- 点击组件绑定(文本框,复选框,...)
- 请组件的属性面板可见
- 展开节点
的applicationSettings
-
点击
...
按钮右侧(PropertyBinding)
选择您要绑定到控制该设置。
Choose which setting you want the control bound to.
这篇关于利用VS.Net设计师绑定自动更新应用程序设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!