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

Nested styles with RadToolBar

1 Answer 150 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 26 Nov 2013, 03:16 PM
I was trying to apply a nested style on a RadToolbar and on its children. I had problems applying the style to certain children like RadButtons and RadToggleButtons. The same occurs with normal WPF Toolbars:

http://stackoverflow.com/questions/20219595/wpf-why-are-nested-styles-not-always-working/20220084?noredirect=1#20220084

The solution is, that you have to override the special style, that the Toolbar defines for Buttons, ToggleButtons etc. For this you need the Toolbar's ToggleButtonStyle Resourcekey which is provided by a normal WPF Toolbar via

public static ResourceKey ToggleButtonStyleKey { get; }
Where do I find this resource Key on a RadToolBar and how do I apply a nested style on all RadButtons/RadToggleButtons of  a RadToobar?

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 26 Nov 2013, 03:25 PM
Hi Peter,

We have sample in our XAML GitHub which demonstrates how to apply custom styles for elements placed in RadToolBar. Please check out the CustomStyledElements sample here. In XAML there are several comments sections providing details.

We hop this will help you proceed further.

Regards,
Petar Mladenov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ToolBar
Asked by
Peter
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or