RadPane Context Menu

4 posts, 0 answers
  1. Hardik
    Hardik avatar
    61 posts
    Member since:
    Jun 2011

    Posted 31 Jan 2012 Link to this post


    I am trying to add a custom context menu item (Setting) in a RadPane dock control MenuItem.

    I am stuck at to attached the custom contextMenu item.

    Following is the code which I did :

     public class ViewPartSettingMenuCommand : RoutedUICommand
        public ViewPartSettingMenuCommand() :
    In the constructor of the view :
     public CommandBindingCollection GetCommandBindings()
          CommandBindingCollection bindings = new CommandBindingCollection();
          bindings.Add(new CommandBinding(this.Resources["ViewPartSettingMenuCommand"as ViewPartSettingMenuCommandthis.OnViewPartSettingMenuCommandExecute));
          return bindings;
    In the resources :
    <DataTemplate x:Key="XamlContextMenu">
                    <telerik:RadMenuItem Header="Floating"
                                                   Command="telerik:RadDockingCommands.Floating" />
                    <telerik:RadMenuItem Header="Dockable"
                                                   Command="telerik:RadDockingCommands.Dockable" />
                    <telerik:RadMenuItem x:Name="ViewPartSettingMenuCommand" />
    in the RadPane :
    <telerik:RadPane x:Name="XamlPane" CanFloat="False" ContextMenuTemplate="{StaticResource XamlContextMenu}">
    I have referred the following link:

    H@rdik Pancholi
  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 03 Feb 2012 Link to this post


    Could you please share with us what difficulties do you experience: the menu is not showing, the commands are not working, or something else. If you could send us some more code related to the issue it will be helpful for tracking down the source of the issue.

    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. Hardik
    Hardik avatar
    61 posts
    Member since:
    Jun 2011

    Posted 06 Feb 2012 Link to this post


    When I am binding the command "CommandManager.SetCommandBindings(thisthis.GetCommandBindings()); ",

    I am getting an exception :

    "Value cannot be null.
    Parameter name: command"

    H@rdik Pancholi.
  4. Boyan
    Boyan avatar
    758 posts

    Posted 07 Feb 2012 Link to this post


    We have answered in your support thread however I will post the modified project here as well if someone else needs it.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top