Click here to Skip to main content
15,891,248 members
Articles / Desktop Programming / WPF

Advanced Guide to WPF ScrollBar or How to Display Millions of Colour Combinations

Rate me:
Please Sign up or sign in to vote.
3.83/5 (7 votes)
3 Aug 2021CPOL10 min read 12.2K   182   8  
Deep dive into the intricacies of combining scrolling and zooming in your control
If you write your own WPF control and its content is big, you need to implement scrolling and zooming. Normally, it is quite convenient to use ScrollViewer for this, but when the content is truly big, it is more efficient to use ScrollBar and write the selected content directly to the screen by overwriting the control's OnRender(). When I started using ScrollBar, I struggled for weeks to get it right. In this article, I like to share some best practices so that you can get your ScrollBar up and running perfectly in no time.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Singapore Singapore
Retired SW Developer from Switzerland living in Singapore

Interested in WPF projects.

Comments and Discussions