If I tap on a pushpin, Contextmenu is opening and displaying the details.. Now I want To Tap/Click on the Contextmenu to do some events.. How to achieve this??? Thanks
<Style x:Key="MenuItemStyle" TargetType="toolkit:MenuItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkit:MenuItem">
<StackPanel>
<TextBlock Text="{Binding Name}"
TextWrapping="Wrap"
Margin="24,0"
FontSize="26" Foreground="Black"/>
<TextBlock Text="{Binding Country}"
Margin="24,0"
FontSize="22" Foreground="Black"/>
<TextBlock Text="{Binding Status}"
Margin="24,0"
FontSize="22" Foreground="Black"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
private void Pushpin_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
{
var _ppmodel = sender as Pushpin;
ContextMenu contextMenu =
ContextMenuService.GetContextMenu(_ppmodel);
contextMenu.DataContext = _viewModel.Pushpins.Where
(c => (c.Coordinates
== _ppmodel.Location)).FirstOrDefault();
if (contextMenu.Parent == null)
{
contextMenu.IsOpen = true;
}
}