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

How to remove the context menu from the radpane header ?

5 Answers 217 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 16 Nov 2012, 02:55 AM
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.

5 Answers, 1 is accepted

Sort by
0
Alek
Telerik team
answered on 16 Nov 2012, 02:21 PM
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.

0
Ravi
Top achievements
Rank 1
answered on 19 Nov 2012, 07:07 AM
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.
0
Yana
Telerik team
answered on 19 Nov 2012, 04:24 PM
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.

0
Ravi
Top achievements
Rank 1
answered on 20 Nov 2012, 09:37 AM
Hi Thanks for your help, its working.
0
Swamy
Top achievements
Rank 1
answered on 17 Nov 2016, 10:06 AM
Thank for your help. It is working fine.
Tags
Docking
Asked by
Ravi
Top achievements
Rank 1
Answers by
Alek
Telerik team
Ravi
Top achievements
Rank 1
Yana
Telerik team
Swamy
Top achievements
Rank 1
Share this question
or