开发者

Settings aren't saving in WPF?

I'm using the registry Settings.settings thingy开发者_如何学Cmabob

I'm doing the following in my XAML:

<TextBox x:Name="textBoxUsername" 
              Text="{Binding Source={x:Static prop:Settings.Default}, 
              Path=Username, Mode=TwoWay}"></TextBox>

This is loading the settings fine. Now in my Window's Closing event I have the following:

Properties.Settings.Default.Save();

But it wont save settings?


Try to write Text attribute like this:

Text="{Binding Source={x:Static prop:Settings.Default}, Path=Username, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜