Binding Properties.Settings to Textbox fails
- by user268098
I would like to define a key & value in Settings.settings and bind the value by declaration in the XAML (not in the code behind by command).
Here's what I've been trying in vain:
Create a WPF project "Exp1" with Visual Studio Express 2010.
Set one key named "TextFromSettings" to the value "Some Text from Setting".
Add the attribute xmlns:p="clr-namespace:Exp1.Properties;assembly=Exp1" to the tag.
Add Text="{Binding Path=TextFromSettings, Mode=TwoWay, Source={x:Static p:Settings.Default}}" to the tag
Now, the preview window shows the text, however, the compiler fails:
"Error 1 Cannot find the type 'Settings'. Note that type names are case sensitive."
Where am I going wrong?