Styling RadMenuItem (click event?)

3 posts, 1 answers
  1. TLDesigner
    TLDesigner avatar
    10 posts
    Member since:
    Aug 2011

    Posted 15 Sep 2011 Link to this post

    Hello,

    Im just trying to get a color background when I click on any radmenuitem.

    I need to put it on app.xaml to do it general for all my menuitem controls.

    Something like:
    <Style x:Key="MenuItemOnClickColor" TargetType="{x:Type telerik:RadMenuItem}">
        <Style.Triggers>
            <Trigger Property="?????????">
                <Setter Property="Background" Value="Red" />
            </Trigger>
        </Style.Triggers>
    </Style>

    Thanks for your help.
    Regards.

  2. TLDesigner
    TLDesigner avatar
    10 posts
    Member since:
    Aug 2011

    Posted 19 Sep 2011 Link to this post

    Someone knows how to do it?

    Thanks.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 19 Sep 2011 Link to this post

    Hello Tldesigner,

    Setting properties is not sufficient to achieve all design details. Although the controls have properties such as BorderBrush Background and Foreground their templates use several visual elements with 2 or 3 borders, shadows, areas with different background colors and states. There is no MouseOverBackground or something like that so if you want  to style the menu you will have to edit the menu's template.
    Editing the colors used in the templates for state effects in Expression Blend should be quite easy.

    Please refer to this forum discussion for more information about editing the RadMenu hover colour. It is for Silverlight, but the same principles apply for WPF.

    Best wishes,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top