This documentation is archived and is not being maintained.

NavigationCommands.GoToPage Property

Updated: December 2008

Gets the value that represents the Go To Page command.

Namespace:  System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public static RoutedUICommand GoToPage { get; }
<object property="NavigationCommands.GoToPage"/>

Property Value

Type: System.Windows.Input.RoutedUICommand
The routed UI command.

Default Values

Key Gesture


UI Text

Go To Page

This command indicates the intention to go to a specific page.

DocumentViewer and FlowDocumentPageViewer implement support for responding to the GoToPage 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.

The following example shows how to use the GoToPage command in conjunction with a FlowDocumentPageViewer. The FlowDocumentPageViewer provides an implementation that responds to the GoToPage command by going to the page specified by the text value of a TextBox control.

<Window xmlns="">


<!-- GoToPage UI-->
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
  <TextBox Name="pageNumberTextBox">1</TextBox>
    CommandTarget="{Binding ElementName=flowDocumentPageViewer}"
    CommandParameter="{Binding ElementName=pageNumberTextBox,Path=Text}">Go To Page</Button>


<!-- The following FlowDocumentPageViewer is used to process NavigationCommands.GoToPage commands -->
<FlowDocumentPageViewer Name="flowDocumentPageViewer">
    <!-- Document Content-->
      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;





Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0




December 2008

Revised the Remarks and the UI Text value in the Return Value section.

Customer feedback.