Reputation: 3009
I'm using the ContextMenu class from the Microsoft.Phone.Controls.Toolkit library to implement a custom context menu for a data-bound ListBox. The simplified part of XAML looks like this:
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu IsZoomEnabled="True" x:Name="contextMenuItems">
<toolkit:MenuItem x:Name="contextMenuItemPinToStart" Header="pint to start"/>
<toolkit:MenuItem Header="rename"/>
<toolkit:MenuItem Header="delete"/>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
I need to disable the 'pin to start' item dynamically when this context menu is about to be opened. There are some problems with implementing this:
Can anybody show me a suitable solution?
Upvotes: 0
Views: 141