Change colors

12 posts, 0 answers
  1. Pan hal
    Pan hal avatar
    61 posts
    Member since:
    Aug 2009

    Posted 10 May 2010 Link to this post


    We use RadMenu in our app and our customer wants the colors to be changed.

    Can you please send the code to change the colors for different states of radtabitems

    For Normal state -  background should be transparent

    For Pressed and MouseOver - background should be darkblue

    For disabled state- it should be light gray.

    This is urgent requirement.  Immediate response is appreciated.

    Thanks
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 12 May 2010 Link to this post

    Hello Pan hal,

    Thank you for your question.

    Please, check the following useful article regarding your inquiry:
    http://www.telerik.com/help/silverlight/radmenu-styling-and-appearance-styling-radmenuitem.html

    Regards,
    Dani
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Pan hal
    Pan hal avatar
    61 posts
    Member since:
    Aug 2009

    Posted 12 May 2010 Link to this post

    Thanks for the response. This is not helpful to us. We have some problem in opening up the expression blend.
    Can you please send me the code.
  5. Dani
    Admin
    Dani avatar
    848 posts

    Posted 13 May 2010 Link to this post

    Hello Pan hal,

    Please find attached a working example of a RadMenu with custom colors.

    Note that the RadMenuItem normally includes 4 separate templates - TopLevelItemTemplate, TopLevelHeaderTemplate, SubmenuItemTemplate, SubmenuHeaderTemplate. Each of those templates employs a common chrome, meaning colors are shared between the 4 templates.

    Therefore in order to change the colors to your own liking, you will need to edit the chrome (in the case of the attached example, each of the 4 templates uses the ButtonChrome). When you open the project in Expression Blend and go to the Resources tab, you will find all editable colors.

    Used versions: Silverlight 4, Expression Blend 4.



    Kind regards,
    Dani
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Pan hal
    Pan hal avatar
    61 posts
    Member since:
    Aug 2009

    Posted 13 May 2010 Link to this post

    Thanks. Do you mind sending as.vb project as I cannot open C# project here.
  7. Dani
    Admin
    Dani avatar
    848 posts

    Posted 14 May 2010 Link to this post

    Hi Pan hal,

    Attached is the same application as a VB project.

    Sincerely yours,
    Dani
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  8. Pan hal
    Pan hal avatar
    61 posts
    Member since:
    Aug 2009

    Posted 27 May 2010 Link to this post

    I am not able to run the project. I get errors. Here are few. Can you please send me an easy way to set the style for Menu.

    Error 1 The type 'telerik:Office_BlueTheme' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\SourceCode_2009\RAMWare\Forum\193349_radmenu-colorchange-vb\RadMenu_ColorChange_VB\SilverlightApplication1\MainPage.xaml 20 10 SilverlightApplication1

    Error 7 The attachable property 'Theme' was not found in type 'StyleManager'. C:\Forum\193349_radmenu-colorchange-vb\RadMenu_ColorChange_VB\SilverlightApplication1\MainPage.xaml 925 230 SilverlightApplication1

    Error 8 The type 'telerik:RadMenu' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Forum\193349_radmenu-colorchange-vb\RadMenu_ColorChange_VB\SilverlightApplication1\MainPage.xaml 970 4 SilverlightApplication1


    Error 9 The type 'telerik:RadMenuItem' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Forum\193349_radmenu-colorchange-vb\RadMenu_ColorChange_VB\SilverlightApplication1\MainPage.xaml 971 5 SilverlightApplication1

    Error 19 The tag 'Office_BlueTheme' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. C:\Forum\193349_radmenu-colorchange-vb\RadMenu_ColorChange_VB\SilverlightApplication1\MainPage.xaml 20 10 SilverlightApplication1


    Error 20 The property 'Theme' does not exist on the type 'ButtonChrome' in the XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. C:\Forum\193349_radmenu-colorchange-vb\RadMenu_ColorChange_VB\SilverlightApplication1\MainPage.xaml 739 256 SilverlightApplication1

    Error 26 The tag 'RadMenu' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. C:\Forum\193349_radmenu-colorchange-vb\RadMenu_ColorChange_VB\SilverlightApplication1\MainPage.xaml 970 4 SilverlightApplication1


    Error 29 The tag 'RadMenuItem' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. C:\Forum\193349_radmenu-colorchange-vb\RadMenu_ColorChange_VB\SilverlightApplication1\MainPage.xaml 973 6 SilverlightApplication1
  9. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 28 May 2010 Link to this post

    Hello Pan hal,

    All you have to do is to add an assembly references to the listed dlls.

    Best wishes,
    Kaloyan
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  10. Pan hal
    Pan hal avatar
    61 posts
    Member since:
    Aug 2009

    Posted 28 May 2010 Link to this post

    I did add the assembly references but no luck. Can you send it again with correct assembly references 
  11. Dani
    Admin
    Dani avatar
    848 posts

    Posted 01 Jun 2010 Link to this post

    Hello Pan hal,

    You only need to add the assembly references to the project. Attached is the project with the needed references in it.

    All the best,
    Dani
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  12. Pan hal
    Pan hal avatar
    61 posts
    Member since:
    Aug 2009

    Posted 14 Jun 2010 Link to this post


    Hi, Thanks for the project. We are using telerikNavigation:RadMenu. The one you sent is not working for this control.
    Can you please change it to TelerikNavigation:RadMenu and send me the project again.

  13. Dani
    Admin
    Dani avatar
    848 posts

    Posted 15 Jun 2010 Link to this post

    Hi Pan hal,

    All you need to do is add the following namespace to all other namespaces in UserControl tag:

    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"

    Also, make sure you use it when declaring the RadMenu like so:

    <telerikNavigation:RadMenu HorizontalAlignment="Left" Margin="117,204,0,0" VerticalAlignment="Top" ItemContainerStyle="{StaticResource RadMenuItemStyle1}" ClickToOpen="True" Background="Transparent">
                <telerikNavigation:RadMenuItem Header="Item 1" ItemContainerStyle="{StaticResource RadMenuItemStyle1}">
                    <telerikNavigation:RadMenuItem Header="Sub Item 1"/>
                    <telerikNavigation:RadMenuItem Header="Sub Item 2" IsEnabled="False"/>
                    <telerikNavigation:RadMenuItem Header="Sub Item 3"/>
                    <telerikNavigation:RadMenuItem Header="Sub Item 4"/>
                    <telerikNavigation:RadMenuItem Header="Sub Item 5"/>
                </telerikNavigation:RadMenuItem>
                <telerikNavigation:RadMenuItem Header="Item 2" IsEnabled="False" ItemContainerStyle="{StaticResource RadMenuItemStyle1}">
                    <telerikNavigation:RadMenuItem Header="Sub Item 3"/>
                    <telerikNavigation:RadMenuItem Header="Sub Item 4"/>
                    <telerikNavigation:RadMenuItem Header="Sub Item 5"/>
                </telerikNavigation:RadMenuItem>
            </telerikNavigation:RadMenu>   


    Regards,
    Dani
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
DevCraft banner