Stop WPF ScrollViewer automatically scrolling to perceived content

前端 未结 2 618
后悔当初
后悔当初 2020-12-15 03:12

The Application

I am building an application which includes a range selector. This consists of two custom drawn Slider controls contain

2条回答
  •  余生分开走
    2020-12-15 03:56

    This may not work in this specific scenario, but a simple, clean solution to prevent a ScrollViewer from scrolling a focused element into view is to make the element unfocusable via Focusable=False. If an element cannot be focused then it will also not be automatically scrolled into view.

提交回复
热议问题