Mouseover background

2 posts, 0 answers
  1. Terry
    Terry avatar
    157 posts
    Member since:
    Jul 2009

    Posted 20 Jun 2010 Link to this post


    I can set the foreground and background color for menu header and subitems.  The foreground color is retained when I do a mouseover of either a header or a subitem, but the background is not.  What is the easiest way to fix that?  It seems like there should be a MouseOverBackground and MouseOverForeground property.  Here is my xaml:

          <Style x:Key="MenuItemStyle" TargetType="telerikNavigation:RadMenuItem">  
            <Setter Property="Foreground" Value="Red"/>  
            <Setter Property="Background" Value="#FF1D52D1"/>  
        <Border x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}">  
            <StackPanel Orientation="Vertical">  
                <telerikNavigation:RadMenu ItemContainerStyle="{StaticResource MenuItemStyle}"  > 
                    <telerikNavigation:RadMenuItem Header="Employees"/>  
                    <telerikNavigation:RadMenuItem Header="Customers"/>  
                    <telerikNavigation:RadMenuItem Header="Projects"/>  
                    <telerikNavigation:RadMenuItem Header="Time Charges"/>  
                    <telerikNavigation:RadMenuItem Header="Billings" ItemContainerStyle="{StaticResource MenuItemStyle}" > 
                        <telerikNavigation:RadMenuItem Header="Invoices" /> 
                        <telerikNavigation:RadMenuItem Header="Cash Receipts" /> 
                    <telerikNavigation:RadMenuItem Header="Reports" ItemContainerStyle="{StaticResource MenuItemStyle}">  
                        <telerikNavigation:RadMenuItem Header="Email Invoices" /> 
                        <telerikNavigation:RadMenuItem Header="Email Cash Receipts" /> 
                        <telerikNavigation:RadMenuItem Header="Accounts Receivable" /> 

  2. Pana
    Pana avatar
    748 posts

    Posted 22 Jun 2010 Link to this post

    Hello Terry,

    In silverlight the Controls have ControlTemplates which can be edited. Foreground, BorderBrush and Background are properties of the Control class but if we want to expose properties for all elements in RadMenu we will need MouseOver-Background/OuterBorder/InnerBorder, TickIcon-Fill/Stroke, Separator line-1/2 etc. The right way to edit these colors or the elements in the RadMenu and RadMenuItem is to edit their templates. Further more in the RadMenuItem we have a ButtonChrome that we use to render the Highlighted state of the RadMenuItem.

    You can check the attached file if you are interested how to edit the RadMenu in Blend you can check the project attaced in this forum post.

    the Telerik team
  3. DevCraft banner
Back to Top