利用VS.Net设计师绑定自动更新应用程序设置 [英] Automatically update the Application Setting using the binding from VS.Net Designer

查看:238
本文介绍了利用VS.Net设计师绑定自动更新应用程序设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是可能的使用设计属性绑定到现有的应用程序设置,这样,我没有写东西像

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.


  1. 点击组件绑定(文本框,复选框,...)

  2. 请组件的属性面板可见

  3. 展开节点的applicationSettings

  4. 点击 ... 按钮右侧(PropertyBinding)

选择您要绑定到控制该设置。

Choose which setting you want the control bound to.

有在的持续探索应用程序设置的秘密

这篇关于利用VS.Net设计师绑定自动更新应用程序设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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