NavigationCommands.NavigateJournal Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the value that represents the Navigate Journal command.

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

static member NavigateJournal : RoutedUICommand with get

Property Value

Type: System.Windows.Input.RoutedUICommand

The routed UI command.

Default Values

Key Gesture


UI Text

Navigation Journal

This command indicates the intention to navigate the journal.

Frame and NavigationWindow implement support for responding to the NavigateJournal 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.

<object property="NavigationCommands.NavigateJournal"/>

The following example shows how to use NavigateJournal in conjunction with a Frame. The Frame provides an implementation that responds to the NavigateJournal command by navigating to the specified journal entry on either the forward or back stacks of the Frame. The journal entries are provided by the JournalEntryUnifiedViewConverter to the top-level Navigate Journal MenuItem. Each journal entry is bound to a child MenuItem that uses the NavigateJournal command.


    <!-- For NavigationCommands.NavigateJournal -->
    <JournalEntryUnifiedViewConverter x:Key="JournalEntryUnifiedViewConverter" />
      <!--Create a DataTemplate to display the navigation history-->
    <DataTemplate x:Key="journalMenuItemTemplate">
        <TextBlock Text="{Binding (JournalEntryUnifiedViewConverter.JournalEntryPosition)}" />
        <TextBlock FontWeight="Bold" FontStyle="Italic">
          <TextBlock Margin="5,0,0,0">(</TextBlock>
          <TextBlock Text="{Binding JournalEntry.Name}"/>
          <TextBlock Margin="5,0,0,0">)</TextBlock>
      <!--Create a style so that all the MenuItems will use the NavigateJournal command-->
    <Style x:Key="journalMenuItemContainerStyle">
      <Setter Property="MenuItem.Command" Value="NavigationCommands.NavigateJournal" />
      <Setter Property="MenuItem.CommandTarget" Value="{Binding ElementName=frame}" />
      <Setter Property="MenuItem.CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}}" />
<!-- Create the Navigation menu using the template and style defined in Window.Resources-->
  Header="Navigate Journal"
  ItemTemplate="{StaticResource journalMenuItemTemplate}"
  ItemContainerStyle="{StaticResource journalMenuItemContainerStyle}" >
    <!--Set the ItemsSource to be the IEnumerable returned from the JournalEntryUnifiedViewConverter-->
    <MultiBinding Converter="{StaticResource JournalEntryUnifiedViewConverter}" >
      <Binding ElementName="frame" Path="BackStack"/>
      <Binding ElementName="frame" Path="ForwardStack"/>
<!-- The following Frame is used to process NavigationCommands.NavigateJournal commands -->
<Frame Name="frame" NavigationUIVisibility="Hidden" Source="Page1.xaml" />

.NET Framework
Available since 3.0
Return to top