Changing the scroll bar style

4 posts, 0 answers
  1. hamish
    hamish avatar
    44 posts
    Member since:
    Jun 2007

    Posted 03 Nov 2014 Link to this post

    I am trying to change the style of the scroll bar on both the Pivot Grid and field list. At the moment when the mouse floats over the "Thumb" (that's the small part of the control you drag left or right or up and down), it turns a solid black which is not the behavior we want.
    How can we change the back color of the "thumb" part of the scroll bar when the mouse flats over it.

    Thanks
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 04 Nov 2014 Link to this post

    Hi Hamish,

    The default Style of the ScrollViewer can be found in the System.Windows.xaml file (located in the installation folder of the controls, Themes.Implicit folder). So what you would need to do would be to extract the default ControlTemplate for the ScrollViewer and modify it as needed. Please give it a try and if you face any issues - let us know. I'll also ask you to share which Theme are you using, so we can further assist you.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. hamish
    hamish avatar
    44 posts
    Member since:
    Jun 2007

    Posted 05 Nov 2014 in reply to Kalin Link to this post

    Thank you for your reply and I would rather not alter these themes as it means I will have to keep them up to date for every new release. Is there not a way I can just apply a style to the repeat button (or thumb as we call it) on the scroll bar to avoid the mouse over effect. We currently use OFFICE2013 theme.

    Look forward to your comments - thanks
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 07 Nov 2014 Link to this post

    Hi Hamish,

    I assume you meant VisualStudio2013 theme as the mouse over color of the scroll bar there is black. However I'm afraid that the only possible solutions here are to either extract and modify the ScrollViewer related Templates (ScrollBarVerticalControlTemplate, ScrollBarVerticalControlTemplate and the RepeatButtons Templates) or to change the theme MarkerBrush as explained here (however please note that will affect all the other controls in the application).

    Hope this helps. If you have any other questions or concerns, please let us know.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top