我遇到問題:在用戶控制的配置文件中更改設置不起作用。在用戶控制的配置文件中更改設置沒有任何作用
我可以添加「設置」用戶控制的項目,可以使下面的代碼工作:
label1.Text = Properties.Settings.Default.DisplayName;
此usercontrol項目的輸出是「usercontorl1.dll」和「usercontrol1.dll.config」。
當我在其他項目中測試它時,發現改變config文件中的值對其顯示沒有影響。即使沒有配置文件,它也能正常工作!
我該如何解決這個問題,我真的需要一個可配置的用戶控件。
謝謝。
的Windows 7 64位 VS 2008 的.Net 3.5
編號:
http://social.msdn.microsoft.com/Forums/da-DK/msbuild/thread/cbbd893c-8d5d-4699-bf51-bdd110946c94
https://stackoverflow.com/questions/6505252/winform-store-configuration-data-for-user-control
Writing/Reading User-Defined settings in app.config file
謝謝,我會測試它。 – 2012-03-07 11:04:41