Removing Context Menu

2 posts, 0 answers
  1. Mark
    Mark avatar
    14 posts
    Member since:
    Sep 2012

    Posted 07 Dec 2012 Link to this post

    Hi,

    I define in my App.xaml this Style to remove the Context Menu from all Panes.

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

    My Panes, which are define in other csprojects and will be loaded by unity still have a context menu.

    Can anybody help me with this situation.
  2. Georgi
    Admin
    Georgi avatar
    347 posts

    Posted 12 Dec 2012 Link to this post

    Hello Mark,

    If you are loading Panes from other csproj files you will need also to set the style for the Panes in those projects App.xaml. For example if you are using panes from "Project 2" in "Project 1" you will need to add the style in the both projects App.xaml. Please note that if you are using different class name for the Panes (telerik:RadPane) you would need to different style for them also, for example :

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

    Hope this will help.


    Kind regards,
    Georgi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top