XAML - MenuFlyoutItem attached to a ListView doesn't work in WP8.1

隐身守侯 提交于 2019-12-02 10:42:16

You are defining your flyout inside your listview, hence the datacontext is set to the Comments property on your ViewModel. Meaning that the 2 commands you are using are not found!

To fix this, you need to reference your page datacontext and use that to locate the commands.

Give your <Page> a name like x:Name="PageRoot" and change the binding of the commands to

{Binding ElementName=PageRoot, Path=DataContext.EditCommentCommand}

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!