[英]ContextMenu in Windows Phone project does not appear
I have problem with contextMenu in Windows Phone. 我在Windows Phone中的contextMenu遇到问题。 It does not appear even in the project which I have downloaded from: http://www.geekchamp.com/articles/wp7-contextmenu-in-depth--part1-key-concepts-and-api When I click the button from the project above nothing happens.
即使在我从以下网站下载的项目中也没有出现它: http : //www.geekchamp.com/articles/wp7-contextmenu-in-depth--part1-key-concepts-and-api当我从该项目之上没有任何反应。
I was searching for the solution but I have not found. 我正在寻找解决方案,但没有找到。 Any ideas?
有任何想法吗?
Code sample which doesn't work: 代码示例不起作用:
<Button Content="OpenContextMenu" Height="100" Width="270">
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu VerticalOffset="50.0" IsZoomEnabled="True" x:Name="menu">
<toolkit:MenuItem Header="Add" Click="MenuItem_Click"/>
<toolkit:MenuItem Header="Update" Click="MenuItem_Click"/>
<toolkit:MenuItem Header="Delete" Click="MenuItem_Click"/>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</Button>
正如MatDev8所建议的那样,您需要“按住”以显示上下文菜单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.