NavigationCommands.PreviousPage 属性

定义

获取表示 Previous Page 命令的值。

public:
 static property System::Windows::Input::RoutedUICommand ^ PreviousPage { System::Windows::Input::RoutedUICommand ^ get(); };
public static System.Windows.Input.RoutedUICommand PreviousPage { get; }
static member PreviousPage : System.Windows.Input.RoutedUICommand
Public Shared ReadOnly Property PreviousPage As RoutedUICommand

属性值

路由的 UI 命令。

默认值
键笔势 不可用
UI 文本 上一页

示例

以下示例演示如何 PreviousPageFlowDocumentPageViewer结合使用。 FlowDocumentPageViewer提供了一个实现,该实现通过转到上一页来PreviousPage响应 命令。

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<!-- NavigationCommands.PreviousPage -->
<MenuItem
  Command="NavigationCommands.PreviousPage"
  CommandTarget="{Binding ElementName=flowDocumentPageViewer}" />
<!-- The following FlowDocumentPageViewer is used to process NavigationCommands.PreviousPage commands -->
<FlowDocumentPageViewer Name="flowDocumentPageViewer">
  <FlowDocument>
    <!-- Document Content-->
    <Paragraph>
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed vulputate, lacus non sagittis pharetra, diam dolor dictum tellus, et hendrerit odio risus nec erat. Nam sollicitudin imperdiet mi. Sed rutrum. Morbi vel nunc. Donec imperdiet. Morbi hendrerit leo. Maecenas imperdiet. Curabitur viverra tempor nisi. Phasellus vitae augue sit amet neque venenatis elementum. Proin posuere lobortis quam. Curabitur et neque. Donec ac sem vitae libero pharetra luctus. Fusce purus. Nulla vehicula, leo commodo dictum lobortis, odio augue accumsan ante, id dictum nisi libero quis diam. Nam augue erat, malesuada eu, tincidunt eu, dictum ut, ante. In vel magna vel ligula faucibus lobortis. Praesent a felis non mi fringilla vulputate. Integer quis tellus cursus elit tincidunt vehicula. Morbi commodo sem eu eros. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
    </Paragraph>
  </FlowDocument>
</FlowDocumentPageViewer>
</Window>

注解

此命令指示转到上一页的意图。

DocumentViewerFlowDocumentReaderFlowDocumentScrollViewerFlowDocumentPageViewer 实现响应 PreviousPage 命令的支持,但不需要使用它;在许多情况下,响应该命令的实现由应用程序编写者负责。

XAML 属性用法

<object property="NavigationCommands.PreviousPage"/>  

适用于

另请参阅