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

Change colors

11 Answers 130 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Pan hal
Top achievements
Rank 1
Pan hal asked on 10 May 2010, 10:36 PM

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

11 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 12 May 2010, 05:52 PM
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.
0
Pan hal
Top achievements
Rank 1
answered on 12 May 2010, 06:30 PM
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.
0
Dani
Telerik team
answered on 13 May 2010, 05:20 PM
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.
0
Pan hal
Top achievements
Rank 1
answered on 13 May 2010, 05:50 PM
Thanks. Do you mind sending as.vb project as I cannot open C# project here.
0
Dani
Telerik team
answered on 14 May 2010, 12:57 PM
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.
0
Pan hal
Top achievements
Rank 1
answered on 27 May 2010, 08:04 PM
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
0
Kaloyan
Telerik team
answered on 28 May 2010, 11:18 AM
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.
0
Pan hal
Top achievements
Rank 1
answered on 28 May 2010, 03:29 PM
I did add the assembly references but no luck. Can you send it again with correct assembly references 
0
Dani
Telerik team
answered on 01 Jun 2010, 11:47 AM
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.
0
Pan hal
Top achievements
Rank 1
answered on 14 Jun 2010, 10:29 PM

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.

0
Dani
Telerik team
answered on 15 Jun 2010, 07:45 AM
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.
Tags
Menu
Asked by
Pan hal
Top achievements
Rank 1
Answers by
Dani
Telerik team
Pan hal
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or