I'm using the registry Settings.settings thingymabob
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?
尝试这样写Text属性:
Text="{Binding Source={x:Static prop:Settings.Default}, Path=Username, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.