我正试图在Windows Phone应用程序中使用Linq到Xml和Xaml数据绑定,但没有成功,请参阅这个例子。
我有一些Xaml,看起来像这样:
<Image
Source="{Binding Path=Element[image].Value, Converter={StaticResource UriBitmapConverter}}"
Grid.Column="2" MaxWidth="75" HorizontalAlignment="Right" VerticalAlignment="Top"/>
DataContext
是XDocument
<;图像>;someuri</图像>代码>。然而,这并没有像我得到的那样通过解析阶段:
Additional information: Invalid attribute value
{Binding Path=Element[image].Value, Converter={StaticResource UriBitmapConverter}} for property
这种绑定在Silverlight中是不可能的,还是我只是缺少了什么?