I am using Visual C # Studio 2010 Express and I have a problem with oakward. I wanted to associate several text fields with the application settings. I followed Paul Sheriff's decision to Paul Sheriff's decision . It works only in the visual designer - I canβt start the application because I got:
XmlParseException 'Provide a value in' System.Windows.StaticResourceExtension ', raised an exception.
How is it possible that it works in the visual designer (values ββare correctly presented in TextBoxes), but there is an 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 opinion:
<TextBox Text="{Binding Source={StaticResource odpSettings}, Path=Default.DbName}" Width="150" />
source share