开发者

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

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 cu开发者_如何学JAVAstom 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 see no reason you cannot use a ScrollViewer. Configure the event handlers of your two arrows (left/right) to minipulate ScrollToHorizontalOffset() and ScrollToVerticalOffset.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜