Hi,
I need to change the style of scroll bar in xamdatagid. There are options to change the style of entire xamdatagid, but not the scroll bar. Any help is appreciated.
Regards!!
Paddy
Here is information about styling the ScrollBar:
http://msdn.microsoft.com/en-us/library/ms742878(VS.85).aspx
The ScrollBar is a Microsoft control and has several parts, thus the intricate Control Template.
You can also look at how Infragistics designers have customized the ScrollBar for our Themes by looking in the Default Styles folder. Here is a post about this:
http://es.infragistics.com/community/forums/p/70625/357527.aspx
For example, in the following file you will find custom styles for the ScrollBars that appear in the XamDataGrid.
C:\Program Files\Infragistics\NetAdvantage 2012.1\WPF\DefaultStyles\DataPresenter\DataPresenterIGTheme_Express.xaml
or
C:\Program Files (x86)\Infragistics\NetAdvantage 2012.1\WPF\DefaultStyles\DataPresenter\DataPresenterIGTheme_Express.xaml
Simply look for : <Style TargetType="{x:Type ScrollBar}">
I looked over the examples and samples. They dont seem to be addressing the basic question . How do you
change the style of the scroll bar in a XamDataGrid. The Xaml shown changes Style of the ScrollViewer but not the scroll bar.
When I change the color in the scrollView - Property it changed the whole background to that color. I just want to operate on the scroll bars.
Also the example show the xamDataGrid with the same styled ( basic ) scroll bars.
Please let me know if change to the scroll bar style ( width, color... ) is possible in XamDataDrid. I am using version 12.
Wow! Thanks for telling me about this bug! I looked at it and there were two triggers missing. The two triggers hook up Left and Right commands to the ScrollBar RepeatButtons when the ScrollBar is positioned to be Horizontal.
I've fixed the bug in the sample and updated the project to work with version 10.3 of NetAdvantage (using VS2008).
Thank you!
Thanks for posting the demo Curtis. The scrollbar is really nice except for one minor bug. When the scrollbar appears horizontally, the repeat buttons still scroll the grid up & down.
The NetAdvantage Feature Browser Sample contains a custom scrollbar. You can do your own from scratch using Expression Blend template editors. Creating the entire ScrollViewer with custom ScrollBars, Thumbs and RepeatButtons is a little work. So I borrowed this example from the Feature Browser and placed it into a simple WPF application.
In the sample, there is a resource dictionary which contains a global ScrollViewer style. In the sample I have a XamDataGrid and a ListBox. By simply including this resource, the global ScrollViewer gets applied to both controls. You can use this sample to make your own ScrollBar styles to match your desired theme.