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

Global override for ScrollBar style on RadControls

1 Answer 213 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ammaar
Top achievements
Rank 1
Ammaar asked on 22 Jan 2013, 01:21 PM
I have an application where multiple RadGridViews are being used as well as a RadTreeView. I would like to override the ScrollBar style for all RadControls in the application so that it uses the default Windows ScrollBar style instead of the RadControls own "shiny" version as it creates an inconsistent UI when other normal WPF ScrollViewers are used in the application. Here's an example: http://i.imgur.com/EXCRbey.png (the top is the default Windows 8 ScrollBar, bottom is a RadGridView ScrollBar).

I've tried adding the following in the application's ResourceDictionary, but it didn't work:

    <Style TargetType="ScrollBar" BasedOn="{StaticResource {x:Type ScrollBar}}"/>

1 Answer, 1 is accepted

Sort by
0
Dimo Mitev
Telerik team
answered on 25 Jan 2013, 09:45 AM
Hi Ammaar,

 You may reset the style for the ScrollBars through adding an implicit targeted at the ScrollBar as shown below:

 
<Window.Resources
<Style TargetType="{x:Type ScrollBar}"/> 
</Window.Resources


 I suggest that you use the Telerik StyleManager, however it does not support this scenario.
 You may globally reset the styles for both scrollbars only with NoXAML binaries and pure implicit styles.
 
 I'm attaching you sample project, which demonstrates how to achieve this result.
 If you want to read more about this you may check our online documentation for further reference following this link: http://www.telerik.com/help/wpf/styling-apperance-implicit-styles-overview.html


Greetings,
Dimo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
General Discussions
Asked by
Ammaar
Top achievements
Rank 1
Answers by
Dimo Mitev
Telerik team
Share this question
or