NavigationCommands.NavigateJournal 속성

정의

Navigate Journal 명령을 나타내는 값을 가져옵니다.

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

속성 값

라우트된 UI 명령입니다.

기본값
키 제스처 N/A
UI 텍스트 업무 일지 탐색

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다 NavigateJournal 와 함께에서 Frame입니다. Frame 에 응답 하는 구현을 제공 합니다 NavigateJournal 앞으로 또는 뒤로 스택에 지정 된 업무 일지 항목으로 이동 하 여 명령을 Frame합니다. 제공 하는 업무 일지 항목의 JournalEntryUnifiedViewConverter 최상위 Navigate JournalMenuItem합니다. 각 업무 일지 항목의 자식에 바인딩되어 MenuItem 를 사용 하는 NavigateJournal 명령입니다.

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

설명

이 명령은 저널을 탐색할 하려고 함을 나타냅니다.

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

XAML 특성 사용

<object property="NavigationCommands.NavigateJournal"/>  

적용 대상

추가 정보