C# WPF horizontal scrollbar for ScrollViewer RepeatButtons only on either side of contents

Someone asked on Stack Overflow:

Is there a way to get a scroll viewer with the RepeatButtons only and to force the buttons to the edge of the contents?

I want it to look like this:

  +---+-------------------------------------------------------------+---+
  |   |                                                             |   |
  | < | Contents here...............................................| > |
  |   |                                                             |   |
  +---+-------------------------------------------------------------+---+

Where the middle is the content of the ScrollViewer, and the left and right are RepeatButtons which will scroll the contents.

I was thinking I could either use a custom ScrollBar (but I don’t know much about this or how to make the buttons go outside the content), or I could just use RepeatButtons and connect their click to the ScrollViewer. Which way (if either) would be better/easier?

I posted the following answer, which was chosen as the accepted answer:

I see no reason you cannot use a ScrollViewer. Configure the event handlers of your two arrows (left/right) to minipulate ScrollToHorizontalOffset() and ScrollToVerticalOffset.


Originally posted on Stack Overflow — 0 upvotes (accepted answer). Licensed under CC BY-SA.

signed letter b

Dad. Geek. Gamer. Software developer. Cloud user. Old Car enthusiast.  Blogger.


Top Posts


profile for Nate on Stack Exchange, a network of free, community-driven Q&A sites
a proud member of the blue team of 512KB club
Thoughts, opinions, and ideas shared here are my own. © 2026 Nate Bross.