I have been binging this for hours and cannot find a sample that seems to work. I have an XDocument. The XML is structured like this...
<JBIndexData>
<MSI>
<Title>
<Main>Main Title Goes Here</Main>
</Title>
</MSI>
</JBIndexData>
In my code getting the XElement for JBIndexData. I am setting the forms DataContext = to the JBIndexData's XElement. In my XAML i have a TextBox.
<TextBox x:Name="txtMain1" Grid.Row="1" Grid.Column="1" Text="{Binding XPath=MSI/Title/Main, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
I am trying to bind it so it will display the "Main Title Goes Here" (Value of Main XElement).
How should my binding work for this?
Thanks, JLinker