Telerik documentation for context menu is missing very important thing

2 posts, 0 answers
  1. Mateusz
    Mateusz avatar
    1 posts
    Member since:
    Jan 2018

    Posted 13 Feb Link to this post


    Teleriks outdated documenation caused me, again, to lose some time finding solution.

    Here is implementation of RadContextMenu for RadGridView, step-by-step guide is clear and explains everything. But menu implemented in this way to my app didn't work. There is important property, not present in documentation:

    BasedOn="{StaticResource RadMenuItemStyle}"

    wwich changes Example 4

    <Style x:Key="MenuItemContainerStyle" TargetType="telerik:RadMenuItem">
        <Setter Property="Header" Value="{Binding Text}"/>
        <Setter Property="ItemsSource" Value="{Binding SubItems}"/>
        <Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>



    <Style x:Key="MenuItemContainerStyle"
                       BasedOn="{StaticResource RadMenuItemStyle}">
                    <Setter Property="Header"
                            Value="{Binding Text}" />
                    <Setter Property="ItemsSource"
                            Value="{Binding SubItems}" />
                    <Setter Property="IsEnabled"
                            Value="{Binding IsEnabled}" />


    Please, update your documentation to save others time. 


    Best Regards,



  2. Vladimir Stoyanov
    Vladimir Stoyanov avatar
    110 posts

    Posted 15 Feb Link to this post

    Hello Mateusz,

    Thank you for your feedback. 

    Let me explain the reason for the styles being defined without the BasedOn property. Setting that property is only required if you are using the NoXaml binaries with implicit styles. In that case you need to base your style on the theme's default one as described in the Styling the Controls article. If you are using the Xaml binaries, there is no need for setting the BasedOn property.

    Vladimir Stoyanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top