ScrollBar.PageUpCommand 字段

定义

按照其 ScrollBar 的减小值的垂直方向大量滚动 Track 的命令。The command that scrolls a ScrollBar by a large amount in the vertical direction of decreasing value of its Track.

public: static initonly System::Windows::Input::RoutedCommand ^ PageUpCommand;
public static readonly System.Windows.Input.RoutedCommand PageUpCommand;
 staticval mutable PageUpCommand : System.Windows.Input.RoutedCommand
Public Shared ReadOnly PageUpCommand As RoutedCommand 

字段值

示例

下面的示例演示如何在自定义 ScrollBar 样式模板中指定 PageUpCommandThe following example shows how to specify the PageUpCommand in a custom ScrollBar style template.

<Style x:Key="ScrollBar_UpTrack" 
       BasedOn="{StaticResource ScrollBar_TrackRepeater}" 
       TargetType="{x:Type RepeatButton}">
  <Setter Property="Command" Value="ScrollBar.PageUpCommand" />
</Style>

注解

此命令通过 LargeChange 属性的值减小 ScrollBarTrackValueThis command reduces the Value of the Track in the ScrollBar by the value of the LargeChange property.

当用户按 PAGE UP 键时,将发生此命令。This command occurs when the user presses the PAGE UP key.

ScrollBar 作为 ScrollViewer 控件的一部分实现时,ScrollViewer 执行此命令。When you implement a ScrollBar as part of a ScrollViewer control, the ScrollViewer executes this command.

XAML 文本用法XAML Text Usage

<对象**属性="滚动条。 PageUpCommand"/>< object property="ScrollBar.PageUpCommand"/>

适用于

另请参阅