How to remove the context menu from the radpane header ?

6 posts, 0 answers
  1. Ravi
    Ravi avatar
    97 posts
    Member since:
    Jun 2012

    Posted 15 Nov 2012 Link to this post

    Hi There,
    I am using the RadPane(I created some styles for it) in my application, when i right click on it's header a context menu is appearing which has the options like "Floating, Dockable, etc..." 
    I dont want this feature in my application, so can you please tell me how i can remove this from from my styles so that it will appears common in all modules.
    I have attached a image please check once.

    Thanks in advance,
    Srinivas.
  2. Alek
    Admin
    Alek avatar
    78 posts

    Posted 16 Nov 2012 Link to this post

    Hello Srinivas,

    Thank you for contacting us.

    You just need to set  ContextMenuTemplate property of RadPane to {x:Null}. This can be done in an implicit style for RadPane as well:

    <Style TargetType="telerik:RadPane">
        <Setter Property="HeaderTemplate" Value="{StaticResource PaneIcon}" />
        <Setter Property="ContextMenuTemplate" Value="{x:Null}" />
    </Style>

    Hope this helps.

    Regards, Alek
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Ravi
    Ravi avatar
    97 posts
    Member since:
    Jun 2012

    Posted 19 Nov 2012 Link to this post

    Hi Alek,

    Thanks for reply, its working properly for RadPane.
    i have another situation where i modified the default behavior of the Radpane by overriding the some of functionality, in this case how do i achieve this ?
    i have added link below which i followed to make the customization, please go through that,
    http://www.telerik.com/community/forums/wpf/docking/how-to-remove-change-animation-from-auto-hide-area.aspx

    in this thread you can see a sample solution. 

    Thanks again for your great support.
    Srinivas.
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 19 Nov 2012 Link to this post

    Hi Srinivas,

    You could use the same approach, but the TargetType will be different:

    <Style TargetType="local:CustomPane">          
        <Setter Property="ContextMenuTemplate" Value="{x:Null}" />
    </Style>

    where local is the namespace where the CustomPane is defined, in your case:

    xmlns:local="clr-namespace:WPF_Docking"

    Kind regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Ravi
    Ravi avatar
    97 posts
    Member since:
    Jun 2012

    Posted 20 Nov 2012 Link to this post

    Hi Thanks for your help, its working.
  7. Swamy
    Swamy avatar
    2 posts
    Member since:
    May 2013

    Posted 17 Nov in reply to Yana Link to this post

    Thank for your help. It is working fine.
Back to Top
UI for WPF is Visual Studio 2017 Ready