你好,
你只需要处理ScrollViewer中容器控件的RequestBringIntoView事件,设置为已经处理即可,例如:
<ScrollViewer x:Name="_mainVScrollViewer">
<StackPanel Width="500" RequestBringIntoView="OnRequestBringIntoView">
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
<Button Content="Button" Margin="16,16,16,16" Height="150" Width="500"/>
</StackPanel>
</ScrollViewer>
后台:
void OnRequestBringIntoView(object sender, RequestBringIntoViewEventArgs e)
{
e.Handled = true;
}
这样,即使点击下面的按钮,也不会自动滚动:

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.