将Windows窗体属性绑定到C#中的ApplicationSettings的最佳方式?

在需要严重重新分解的桌面应用程序中,我有几个代码块,如下所示:
private void LoadSettings()
{
    WindowState = Properties.Settings.Default.WindowState;
    Location = Properties.Settings.Default.WindowLocation;
    ...
}

private void SaveSettings()
{
    Properties.Settings.Default.WindowState = WindowState;
    Properties.Settings.Default.WindowLocation = Location;
    ...
}

什么是替代这个的最佳方法?项目施加的限制:

> Visual Studio 2005
> C#/ .NET 2.0
> Windows窗体

更新

感谢Tundey,看起来像去的路.对于后代,我还发现了两个有用的教程:“Windows Forms User Settings in C#”“Exploring Secrets of Persistent Application Settings”.

我曾问过关于使用这种技术来绑定表单Size here的后续问题.我将它们分开来帮助搜索类似问题的人们.

如果您在设计器中打开Windows窗体,请查看属性框.第一个项目应该是“(ApplicationSetting)”.那就是“(PropertyBinding)”.那就是你会找到完全符合你想要的选择.

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...