XPATH equality expression value in XAML Errors (C#, WPF)

前端 未结 1 1717
心在旅途
心在旅途 2021-01-21 11:57

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

degree[@from != \"Harvard\"] - All elements where the from attribute is not equal to \"Harvard\".

相关标签:
1条回答
  • 2021-01-21 12:18

    First, enclose your whole XPath with ' so that the XAML parser does not try to interpret @Type= as a syntax error. Then, use the standard XML entity " to represent a double quote:

    {Binding XPath='/EssenceList/Essence[@Type="Role"]'}
    
    0 讨论(0)
提交回复
热议问题