This question is locked. New answers and comments are not allowed.
Hi,
I previously had a RadMenu working with commands. Since it was just a one top level item RadMenu, I've attempted to convert it to a ToggleButton with a RadContextMenu. However my commands have stopped working. I have hooked up both options to the same ItemTemplateSelector (which assigns the ContainerBinding to the commands) and one works while the other doesn't. Have I missed something or is there a difference between the ContextMenu and regular Menu?
I previously had a RadMenu working with commands. Since it was just a one top level item RadMenu, I've attempted to convert it to a ToggleButton with a RadContextMenu. However my commands have stopped working. I have hooked up both options to the same ItemTemplateSelector (which assigns the ContainerBinding to the commands) and one works while the other doesn't. Have I missed something or is there a difference between the ContextMenu and regular Menu?
<!-- New Way -->
<
ToggleButton
Content
=
"Desktop"
IsChecked
=
"{Binding IsOpen, ElementName=DesktopItemsContextMenu, Mode=TwoWay}"
>
<
telerikNavigation:RadContextMenu.ContextMenu
>
<
telerikNavigation:RadContextMenu
x:Name
=
"DesktopItemsContextMenu"
Placement
=
"Bottom"
ItemsSource
=
"{Binding Menu.DesktopItems}"
ItemTemplateSelector
=
"{StaticResource DesktopDropDownMenu_TemplateSelector}"
>
</
telerikNavigation:RadContextMenu
>
</
telerikNavigation:RadContextMenu.ContextMenu
>
</
ToggleButton
>
<!-- Old Way -->
<
telerikNavigation:RadMenu
>
<
telerikNavigation:RadMenuItem
Header
=
"Desktop"
ItemsSource
=
"{Binding Menu.DesktopItems}"
ItemTemplateSelector
=
"{StaticResource DesktopDropDownMenu_TemplateSelector}"
>
</
telerikNavigation:RadMenuItem
>
</
telerikNavigation:RadMenu
>
<
Rad:ContainerBindingCollection
x:Key
=
"ActiveItem_Bindings"
>
<
Rad:ContainerBinding
PropertyName
=
"Icon"
Binding
=
"{Binding VectorXaml}"
/>
<
Rad:ContainerBinding
PropertyName
=
"Command"
Binding
=
"{Binding DataContext.NavigateToCommand, ElementName=LayoutRoot, Mode=OneWay}"
/>
<
Rad:ContainerBinding
PropertyName
=
"CommandParameter"
Binding
=
"{Binding}"
/>
</
Rad:ContainerBindingCollection
>