Hello,
I would like to programatically generate a RadContextMenu when push-pins on my RadMap are right-clicked.
Currently I have an event added to my "ClusteredItemTemplate" that points to my method "ClustereItemRightClick"
At runtime I get the error "Failed to assign to property 'System.Windows.UIElement.MouseRightButtonUp'."
Any ideas on how to generate RadContextMenus for Pushpins?
Thanks.
I would like to programatically generate a RadContextMenu when push-pins on my RadMap are right-clicked.
Currently I have an event added to my "ClusteredItemTemplate" that points to my method "ClustereItemRightClick"
<
DataTemplate
x:Key
=
"ClusteredItemTemplate"
>
<
telerik:Pushpin
telerik:MapLayer.Location
=
"{Binding Path=Location}"
Style
=
"{StaticResource CustomPushpin}"
ToolTipService.ToolTip
=
"{Binding Title}"
ToolTipService.Placement
=
"Mouse"
MouseLeftButtonUp
=
"ClusteredItemMouseClick"
MouseRightButtonUp
=
"ClusteredItemRightClick"
>
</
telerik:Pushpin
>
</
DataTemplate
>
private
void
ClusteredItemRightClick(Pushpin sender, MouseEventArgs e)
{
RadContextMenu contextMenu =
new
RadContextMenu();
contextMenu.Items.Add(
new
RadMenuItem() { Header =
"Go to building view"
});
contextMenu.PlacementTarget = sender;
contextMenu.IsOpen =
true
;
}
At runtime I get the error "Failed to assign to property 'System.Windows.UIElement.MouseRightButtonUp'."
Any ideas on how to generate RadContextMenus for Pushpins?
Thanks.