I am using Visual C# Studio 2010 Express and I have oakward problem. I wanted to bind few TextBoxes to application Settings. I've followed Paul Sheriff's solution Paul Sheriff's solution. It works only in visual designer - I can't run the app, cause i got:
XmlParseException 'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.
How is it possible, that it's working in visual designer (values are presented in TextBoxes correctly) but there is a XmlParseException?
App.xaml:
<Application.Resources>
<ObjectDataProvider x:Key="odpSettings" ObjectType="{x:Type setts:Settings}" />
</Application.Resources>`
The setts namespace is defined as xmlns:setts="clr-namespace:DbCopier.Properties"
My view:
<TextBox
Text="{Binding Source={StaticResource odpSettings}, Path=Default.DbName}"
Width="150" />