NavigationCommands.Favorites Proprietà

Definizione

Ottiene il valore che rappresenta il Favorites comando.

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

Valore della proprietà

Comando indirizzato dell'interfaccia utente.

Valori predefiniti
Movimento della chiave CTRL+I
Testo dell'interfaccia utente Preferiti

Esempio

Nell'esempio seguente viene illustrato come implementare il Favorites codice che risponde al comando insieme a un oggetto Frame.

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

Commenti

Questo comando indica l'intenzione di gestire e passare ai preferiti.

Non esiste alcuna implementazione per rispondere al comando Favorites in una determinata classe macchine virtuali Windows. Di conseguenza, è necessario fornire un'implementazione appropriata, come illustrato nell'esempio.

Utilizzo degli attributi XAML

<object property="NavigationCommands.Favorites"/>

Si applica a

Vedi anche