NavigationCommands.NavigateJournal 속성

정의

Navigate Journal 명령을 나타내는 값을 가져옵니다.Gets the value that represents the Navigate Journal command.

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

속성 값

라우트된 UIUI 명령입니다.The routed UIUI command.

기본값Default Values
키 제스처Key Gesture 해당 없음N/A
UI 텍스트UI Text 업무 일지 탐색Navigation Journal

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다 NavigateJournal 와 함께에서 Frame입니다.The following example shows how to use NavigateJournal in conjunction with a Frame. Frame 에 응답 하는 구현을 제공 합니다 NavigateJournal 앞으로 또는 뒤로 스택에 지정 된 업무 일지 항목으로 이동 하 여 명령을 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. 제공 하는 업무 일지 항목의 JournalEntryUnifiedViewConverter 최상위 Navigate Journal MenuItem합니다.The journal entries are provided by the JournalEntryUnifiedViewConverter to the top-level Navigate Journal MenuItem. 각 업무 일지 항목의 자식에 바인딩되어 MenuItem 를 사용 하는 NavigateJournal 명령입니다.Each journal entry is bound to a child MenuItem that uses the NavigateJournal command.

<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <Window.Resources>
    <!-- For NavigationCommands.NavigateJournal -->
    <JournalEntryUnifiedViewConverter x:Key="JournalEntryUnifiedViewConverter" />
      <!--Create a DataTemplate to display the navigation history-->
    <DataTemplate x:Key="journalMenuItemTemplate">
      <TextBlock>
        <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>
        </TextBlock>
      </TextBlock>
    </DataTemplate>
      <!--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}}" />
    </Style>
  </Window.Resources>
<!-- Create the Navigation menu using the template and style defined in Window.Resources-->
<MenuItem
  Header="Navigate Journal"
  ItemTemplate="{StaticResource journalMenuItemTemplate}"
  ItemContainerStyle="{StaticResource journalMenuItemContainerStyle}" >
    <!--Set the ItemsSource to be the IEnumerable returned from the JournalEntryUnifiedViewConverter-->
  <MenuItem.ItemsSource>
    <MultiBinding Converter="{StaticResource JournalEntryUnifiedViewConverter}" >
      <Binding ElementName="frame" Path="BackStack"/>
      <Binding ElementName="frame" Path="ForwardStack"/>
    </MultiBinding>
  </MenuItem.ItemsSource>
</MenuItem>
<!-- The following Frame is used to process NavigationCommands.NavigateJournal commands -->
<Frame Name="frame" NavigationUIVisibility="Hidden" Source="Page1.xaml" />
</Window>

설명

이 명령은 저널을 탐색할 하려고 함을 나타냅니다.This command indicates the intention to navigate the journal.

FrameNavigationWindow 에 응답 하는 것에 대 한 지원을 구현 합니다 NavigateJournal 명령을 사용 하 여 필요 하지 않지만, 대부분의 구현은 명령에 응답 하는 애플리케이션 개발자의 책임입니다.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.

XAML 특성 사용XAML Attribute Usage

<object property="NavigationCommands.NavigateJournal"/>  

적용 대상

추가 정보