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

Styling RadMenuItem (click event?)

2 Answers 181 Views
Menu
This is a migrated thread and some comments may be shown as answers.
TLDesigner
Top achievements
Rank 1
TLDesigner asked on 15 Sep 2011, 02:17 PM
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 Answers, 1 is accepted

Sort by
0
TLDesigner
Top achievements
Rank 1
answered on 19 Sep 2011, 10:00 AM
Someone knows how to do it?

Thanks.
0
Accepted
Konstantina
Telerik team
answered on 19 Sep 2011, 02:15 PM
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 >>
Tags
Menu
Asked by
TLDesigner
Top achievements
Rank 1
Answers by
TLDesigner
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or