Επεξεργασία

Κοινή χρήση μέσω


NavigationCommands.PreviousPage Property

Definition

Gets the value that represents the Previous Page command.

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

Property Value

The routed UI command.

Default Values
Key Gesture N/A
UI Text Previous Page

Examples

The following example shows how to use PreviousPage in conjunction with a FlowDocumentPageViewer. The FlowDocumentPageViewer provides an implementation that responds to the PreviousPage command by going to the previous page.

<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>

Remarks

This command indicates the intention to go to the previous page.

DocumentViewer, FlowDocumentReader, FlowDocumentScrollViewer, and FlowDocumentPageViewer implement support for responding to the PreviousPage command, although you are not required to use it; in many cases the implementation in response to that command is the responsibility of the application writer.

XAML Attribute Usage

<object property="NavigationCommands.PreviousPage"/>  

Applies to

See also