UICommand Classe
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Rappresenta un comando in un menu di scelta rapida.
public ref class UICommand sealed : IUICommand
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Popups.IUICommandFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UICommand final : IUICommand
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Popups.IUICommandFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class UICommand final : IUICommand
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Popups.IUICommandFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class UICommand : IUICommand
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Popups.IUICommandFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class UICommand : IUICommand
function UICommand(label, action, commandId)
Public NotInheritable Class UICommand
Implements IUICommand
- Ereditarietà
- Attributi
- Implementazioni
Requisiti Windows
Famiglia di dispositivi |
Windows 10 (è stato introdotto in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (è stato introdotto in v1.0)
|
Commenti
Utilizzare la proprietà PopupMenu.Commands per aggiungere o modificare i comandi in un menu di scelta rapida.
Costruttori
UICommand() |
Crea una nuova istanza della classe UICommand . |
UICommand(String) |
Crea una nuova istanza della classe UICommand usando l'etichetta specificata. |
UICommand(String, UICommandInvokedHandler) |
Crea una nuova istanza della classe UICommand usando l'etichetta e il gestore eventi specificati. |
UICommand(String, UICommandInvokedHandler, Object) |
Crea una nuova istanza della classe UICommand usando l'etichetta, il gestore eventi e l'identificatore di comando specificati. |
Proprietà
Id |
Ottiene o imposta l'identificatore del comando. |
Invoked |
Ottiene o imposta il gestore per l'evento generato quando l'utente seleziona UICommand. |
Label |
Ottiene o imposta l'etichetta per il comando. |