Sunday, 8 September 2013

Difference between and

Difference between and

I have the following XAML:
<TextBox Name="txtAppName" Text="{Binding
XPath=setting[@name\=\'SiteID\']/value}"/>
This works just fine (DataContext on the window is set to an
XMLDataProvider).
However, when I change the syntax to this:
<TextBox Name="txtAppName">
<TextBox.Text>
<Binding XPath="setting[@name\=\'AppName\']/value">
</Binding>
</TextBox.Text>
</TextBox>
The binding does not work. I'm changing it to this so I can add validation
but I can't seem to get the binding to work with or without the
validation. There are no syntax errors when I compile but the data does
not show in the textbox. I'm hoping I'm missing something simple. I'm
using VS 2008.

No comments:

Post a Comment