I have a xaml file with my wpf controls defined, I am binding all its label controls to an xml file and populating from this file. I am doing using xmldataprovider using its source property
<Grid.DataContext>
<XmlDataProvider x:Name="LoadData" Source="data.xml" XPath="Loads/*" Document=/>
</Grid.DataContext>
<Label Grid.Row="1" Name="textbox1" Grid.Column="0" Grid.RowSpan="3" Grid.ColumnSpan="2" Background="Gray" BorderThickness="2" Content="{Binding XPath=teamname, Mode=OneWay}" FontSize="36">
and in the code behind,
string filename = "C:\\data.xml";
LoadData.Source = new Uri(filename);
Everything works fine, my only problem is i want to open this xml in read only mode as one of another program is writing to it and i get exception of" being used by another program"
is there any such provision from xmldataprovider to set the source/read the xml file in data provider..Has anyone does this before...input/suggestions are welcome...many thanks