小编use*_*249的帖子

XAML错误(C#,WPF)中的XPATH相等表达式值

MSDN说http://msdn.microsoft.com/en-us/library/ms256086.aspx

degree [@from!="Harvard"] - from属性不等于"Harvard"的所有元素.

但是当我尝试在我的xaml代码中实现它时会导致错误,因为在XAML语法中所有的值元素都应该放在引号中,我该如何解决这个问题呢?

<ComboBox ItemTemplate="{StaticResource rolelistTemplate}" ItemsSource="{Binding XPath=/EssenceList/Essence[@Type="Role"]}" IsSynchronizedWithCurrentItem="True"/>
Run Code Online (Sandbox Code Playgroud)

我也试过这个,但它也给了我语法错误

 <ComboBox ItemTemplate="{StaticResource rolelistTemplate}"  ItemsSource="{Binding XPath=/EssenceList/Essence[@Type='Role']}" IsSynchronizedWithCurrentItem="True" /> 
Run Code Online (Sandbox Code Playgroud)

wpf xaml xpath

2
推荐指数
1
解决办法
677
查看次数

标签 统计

wpf ×1

xaml ×1

xpath ×1