Hi Telerik,
I'm having trouble triggering the ContextMenuOpening event in order to handle the event and not show the context menu.
With standard WPF context menu I would handle the event on the control owning the context menu, but I can't seem to get this right with RadContextMenu control. Hope you can guide me on how to achieve this. I have a code block as below:
The event never invokes "calendar_ContextMenuOpening"
Thanks in advance,
Best regards
Kasper Schou
I'm having trouble triggering the ContextMenuOpening event in order to handle the event and not show the context menu.
With standard WPF context menu I would handle the event on the control owning the context menu, but I can't seem to get this right with RadContextMenu control. Hope you can guide me on how to achieve this. I have a code block as below:
<
telerik:RadCalendar
Grid.Row
=
"1"
Margin
=
"6,6,6,6"
x:Name
=
"calendar"
IsTodayHighlighted
=
"False"
telerikControls:StyleManager.Theme
=
"Vista"
DayTemplateSelector
=
"{StaticResource templateSelector}"
Columns
=
"4"
Rows
=
"3"
ViewsHeaderVisibility
=
"Visible"
FirstDayOfWeek
=
"Monday"
HeaderVisibility
=
"Visible"
ContextMenuOpening
=
"calendar_ContextMenuOpening"
>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
x:Name
=
"cmCalendar"
Opened
=
"ContextMenuCalendar_Opened"
telerikControls:StyleManager.Theme
=
"Vista"
>
<
telerik:RadMenuItem
x:Name
=
"miHoliday"
Header
=
"{x:Static local:CentralCalendarWindowGlossary.miHoliday_Header}"
Click
=
"MenuItemHoliday_Click"
IsCheckable
=
"True"
ToolTipService.ShowOnDisabled
=
"True"
ToolTipService.IsEnabled
=
"{Binding Path=IsEnabled}"
ToolTip
=
"{DynamicResource toolTipDefault}"
/>
<
telerik:RadMenuItem
x:Name
=
"miNoDistribution"
Header
=
"{x:Static local:CentralCalendarWindowGlossary.miNoDistribution_Header}"
IsCheckable
=
"True"
Click
=
"MenuItemNoDistribution_Click"
ToolTipService.ShowOnDisabled
=
"True"
ToolTipService.IsEnabled
=
"{Binding Path=IsEnabled}"
ToolTip
=
"{DynamicResource toolTipDefault}"
/>
<
telerik:RadMenuItem
IsSeparator
=
"True"
/>
<
telerik:RadMenuItem
x:Name
=
"miSiteDistribution"
Header
=
"{x:Static local:CentralCalendarWindowGlossary.miSiteDistribution_Header}"
Click
=
"MenuItemSiteDistribution_Click"
ToolTipService.ShowOnDisabled
=
"True"
ToolTipService.IsEnabled
=
"{Binding Path=IsEnabled}"
ToolTip
=
"{DynamicResource toolTipDefault}"
>
<
telerik:RadMenuItem.Icon
>
<
Image
Source
=
"/AN.Planner.Administrator;component/Images/SiteDetailsViewSmall.ico"
/>
</
telerik:RadMenuItem.Icon
>
</
telerik:RadMenuItem
>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
</
telerik:RadCalendar
>
The event never invokes "calendar_ContextMenuOpening"
Thanks in advance,
Best regards
Kasper Schou