How to hide or disable the 'Hide' option on RadPane contextmenu?

2 posts, 0 answers
  1. Chris
    Chris avatar
    18 posts
    Member since:
    Nov 2009

    Posted 19 Sep 2012 Link to this post


    I have a RadDocking control and want to hide or disable the 'Hide' option from the contextmenu. There is a CanFloat and CanUserClose property but no CanHide.

    Does anyone know how this could be achieved?
  2. Vladi
    Vladi avatar
    749 posts

    Posted 24 Sep 2012 Link to this post

    Hi Chris,

    Thank you for contacting us.

    In order to customize the context menu you will need to edit RadPane style and customize the ContextMenuTemplate by removing the "Hide" RadMenuItem (the item with Close command). The next code snippet represents a sample ContextMenuTemplate taken from the control theme in which the Hide button is removed:
    <Setter Property="ContextMenuTemplate">
                <telerik:RadContextMenu ClickToOpen="True" InheritDataContext="False">
                    <!--<telerik:RadMenuItem CommandTarget="{Binding}" CommandParameter="{Binding}" Command="telerik:RadDockingCommands.Close" Header="{Binding Command.Text, RelativeSource={RelativeSource Self}}" IsChecked="{Binding IsHidden}"/>-->

    The easiest way to achieve that is by using Implicit Styles.

    If you have any other questions feel free to write to us again.

    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Back to Top