Alm开发者_JAVA百科ost everywhere in Windows Phone (for instance in the People hub), when you hold down your finger anywhere, a context-menu-ish menu pops up that says "Refresh".
How can I recreate this menu in my own application? I don't even know what to call it.
You can achieve this by using the toolkit's (August 2011) ContextMenu.
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
<ListBoxItem>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Header="something" Command="{Binding SomeCommand}" />
<toolkit:MenuItem Header="something else" Command="{Binding SomeOtherCommand}" />
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
精彩评论