NavigationCommands.NavigateJournal Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Komutu temsil Navigate Journal
eden değeri alır.
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
Özellik Değeri
Yönlendirilen UI komutu.
Varsayılan Değerler | |
---|---|
Anahtar Hareketi | Yok |
Kullanıcı Arabirimi Metni | Gezinti Journal |
Örnekler
Aşağıdaki örnekte, ile birlikte nasıl kullanılacağı NavigateJournal gösterilmektedir Frame. , Frame komutunun NavigateJournal ileri veya geri yığınlarında belirtilen günlük girdisine giderek komutuna Frameyanıt veren bir uygulama sağlar. Günlük girişleri, tarafından JournalEntryUnifiedViewConverter en üst düzeye Navigate Journal
MenuItemsağlanır. Her günlük girdisi, komutunu kullanan bir alt MenuItem öğeye NavigateJournal bağlıdır.
<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>
Açıklamalar
Bu komut günlükte gezinme amacını gösterir.
Frame komutunu NavigationWindow kullanmanız gerekmese de komutu yanıtlamak NavigateJournal için destek uygulayın; çoğu durumda bu komuta yanıt olarak uygulama uygulama yazarının sorumluluğundadır.
XAML Öznitelik Kullanımı
<object property="NavigationCommands.NavigateJournal"/>
Şunlara uygulanır
Ayrıca bkz.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin