阅读背景:

WPF使用ICommand在WebBrowser中创建一个带有ContextMenu的ListView

来源:互联网 

I am trying to create a ListView with ContextMenu inside of a WebBrowser and then use ICommand to Bind. However, the example listed below when this is ran I am getting the following error: System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ListView', AncestorLevel='1''. BindingExpression:Path=DataContext.MyCode; DataItem=null; target element is 'MenuItem' (Name=''); target property is 'Command' (type 'ICommand')I am trying to create a ListView with ContextMe




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: