Share via


NavigationCommands.Favorites Özellik

Tanım

Komutu temsil Favorites eden değeri alır.

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

Özellik Değeri

Yönlendirilen kullanıcı arabirimi komutu.

Varsayılan Değerler
Anahtar Hareketi CTRL+I
UI Metni Sık Kullanılanlar

Örnekler

Aşağıdaki örnek, komutuna bir ile Framebirlikte yanıt veren kodun Favorites nasıl uygulandığını gösterir.

<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.Favorites">
<!-- NavigationCommands.Favorites -->
<MenuItem Command="NavigationCommands.Favorites">
  <MenuItem.CommandBindings>
    <!-- NavigationCommands.Favorites Binding-->
    <CommandBinding
      Command="NavigationCommands.Favorites"
      CanExecute="navigationCommandFavorites_CanExecute"
      Executed="navigationCommandFavorites_Executed" />
  </MenuItem.CommandBindings>
</MenuItem>
<Frame Name="frame" NavigationUIVisibility="Hidden" Source="Page1.xaml" />
</Window>

Açıklamalar

Bu komut, sık kullanılanları yönetme ve sık kullanılanlara gitme amacını gösterir.

Belirli bir WPF sınıfında komutuna yanıt vermek Favorites için bir uygulama yoktur. Bu nedenle, örnekte gösterilen uygun bir uygulama sağlamanız gerekir.

XAML Öznitelik Kullanımı

<object property="NavigationCommands.Favorites"/>  

Şunlara uygulanır

Ayrıca bkz.