Same XAML Silverlight and WPF – different result
I did not know the following would produce different results in WPF and Silverlight
<Grid>
<TextBlock Text=”{Binding RelativeSource={RelativeSource Self}, Path=Tag}” Tag=”hello”/>
</Grid>
In WPF, you see “Hello”. In silverlight you dont see anything
The following XAML produces same result in WPF and Silverlight
<Grid>
<TextBlock Tag=”hello” Text=”{Binding RelativeSource={RelativeSource Self}, Path=Tag}” />
</Grid>
Categories: General
That is diffinetly an unusual feature
Lee, I’ll make sure this issue gets filed in the Silverlight bug database. Thanks for the report!
Thanks
Does this hava something to do with the order in which the tags are defined?
I’ve noticed that in the Silverlight example the Tag-tag is placed before the Text-tag and in the WPF example the other way around
Hi, I think some propertychage notofications are not triggering
Have a look at http://stackoverflow.com/questions/1301119/silverlight-xaml-attribute-definition-order-matters
Hi,
Tag is a DependencyProperty, it should not matter where it is in the XAML