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

Toggle button style

5 Answers 234 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Marcin asked on 18 Feb 2009, 08:22 PM
Hi,
how can I change toggle button style that it looks like RadButtonElement (etc. border,background). When i try do something in edit ui element etc changing background disabled on mouse over style. Can I edit ToggleButton in Theme Builder?

Thanks
Marcin

5 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 20 Feb 2009, 09:09 AM
Hi Marcin,

Thank your for writing.
You can :). The builder is indeed what you should use. Here is the documentation for the Theme Builder (Note that Visual Style Builder and Theme Builder are the same thing). Here are also some movies on VSB(VisualStyleBuilder) that you can watch.
I hope this will be useful to you. Please write back if you have other questions.

Regards,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Marcin
Top achievements
Rank 1
answered on 20 Feb 2009, 09:21 PM
Dear Victor,
Thakns for replay. I still cannot figure out how to change style of toggle button. In tutorial somebody created ribbon bar that looks exactly the same like in theme builder. It has few chunks and RadButtonElements but no togglebutton. When i open theme builder i see exactly the same ribbon bar like in tutorial. So how can i change style of toggle button if there is no button of this type?

Regards,
Marcin
0
Victor
Telerik team
answered on 23 Feb 2009, 12:32 PM
Hello Marcin,

Thank you for writing. I have attached a few screenshots:

Screenshot 1 shows how to load the Toggle Button.
Screenshot 2 shows the property grid where you can edit various button properties and states that the button can be in (pressed, hovered etc.).
In screenshot 3 I have highlighted the the theme name field as it is important to give your theme a name once you decide to save your work.

I hope this will be helpful. Please write back if you need further assistance.

Regards,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Marcin
Top achievements
Rank 1
answered on 23 Feb 2009, 09:58 PM
Hi Victor,
maybe i didn't explain what is my problem :-) .
Telerik.WinControls.UI.RadToggleButtonElement - instance of this class can be nested in other controls like RibbonBar. Doesn't exposes properties like ThemeName
 Telerik.WinControls.UI.RadToggleButton - wrapper for RadToggleButtonElemen. Implements additional functionalites and exposes properties like ThemeNane

So class Telerik.WinControls.UI.RadToggleButtonElement doen't have properties like ThemeName so i cannot apply theme for instace of this class but i can do it for instance of class Telerik.WinControls.UI.RadToggleButton (like you showed in screens). I assume that clas RadToggleButton is wrapper for RadToggleButtonElement that implements additional functionalities and exposes properties like ThemeName. But collection of elements that are diplayed in ribbonbar doesn't let us to add instance of class Telerik.WinControls.UI.RadToggleButton only RadToggleButtonElement  is allowed. So how can apply theme for object that doesn't have properties ThemeName?

Regards,
Marcin
0
Victor
Telerik team
answered on 26 Feb 2009, 09:27 AM
Hi Marcin,

Thank you for writing. Please excuse me for the misunderstanding. This can be done by adding a style sheet relation to your toggle button theme xml file. After you create your theme, open the xml in VisualStudio and collapse the BuilderData tag. Then you should see a <StyleRelations> tag and some relations inside. Replace the last relation with this one:

<RadStylesheetRelation ControlType="Telerik.WinControls.UI.RadRibbonBar" ElementType="Telerik.WinControls.UI.RadToggleButtonElement" />

There is one more thing that needs to be done. While you are still in the xml file, change the theme name (second line in the file) to the theme you have currently set to the ribbon. For example, if your ribbon is using the "ControlDefault" theme you have to change the theme name of your toggle button theme to "Control Default".

After you do this, load your theme and tell me if this worked. I am looking forward to your reply.

Greetings,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
RibbonBar
Asked by
Marcin
Top achievements
Rank 1
Answers by
Victor
Telerik team
Marcin
Top achievements
Rank 1
Share this question
or