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 텍스트 | 업무 일지 탐색 |
예제
다음 예제에서는 사용 하는 방법을 보여 줍니다 NavigateJournal 와 함께에서 Frame입니다. Frame 에 응답 하는 구현을 제공 합니다 NavigateJournal 앞으로 또는 뒤로 스택에 지정 된 업무 일지 항목으로 이동 하 여 명령을 Frame합니다. 제공 하는 업무 일지 항목의 JournalEntryUnifiedViewConverter 최상위 Navigate 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"/>
적용 대상
추가 정보
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기