How can I make the Silverlight ScrollViewer scroll to show a child control with focus?

后端 未结 4 1973
时光取名叫无心
时光取名叫无心 2021-02-05 16:30

I have a ScrollViewer which contains a Grid with multiple controls in it. The user can tab through the controls, but eventually they tab to a control that isn\'t in view - so th

4条回答
  •  孤街浪徒
    2021-02-05 17:12

    The silverlight toolkit contains a method "ScrollIntoView".

    Add a reference to System.Windows.Controls.Toolkit.dll ans you should be able to use the code below.

    scrollViewer.ScrollIntoView(control);

提交回复
热议问题