This is a migrated thread and some comments may be shown as answers.

Problem with commands on RadContextMenu.

1 Answer 115 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 09 Jul 2010, 05:00 PM
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?

<!-- 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>


 

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 12 Jul 2010, 08:29 AM
Hello Rob,

Do you have a CommandBinding that listen for this command?
Could you send us working example where we can reproduce it?

Sincerely yours,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Menu
Asked by
Rob
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or