NavigationCommands.NavigateJournal 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
명령을 나타내는 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 텍스트 | 탐색 저널 |
예제
다음 예제에서는 NavigateJournalFrame. 이 Frame 명령은 정방향 또는 뒤로 스택의 지정된 저널 항목으로 이동하여 명령에 응답 NavigateJournal 하는 구현을 Frame제공합니다. 저널 항목은 최상위 수준에 JournalEntryUnifiedViewConverterNavigate Journal의해 MenuItem 제공됩니다. 각 저널 항목은 명령을 사용하는 자식 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>
설명
이 명령은 저널을 탐색하려는 의도를 나타냅니다.
Frame 명령을 NavigationWindow 사용할 필요는 없지만 명령에 응답하기 NavigateJournal 위한 지원을 구현하고 구현합니다. 대부분의 경우 해당 명령에 대한 응답 구현은 애플리케이션 작성기의 책임입니다.
XAML 특성 사용
<object property="NavigationCommands.NavigateJournal"/>