Compartir a través de


UICommand Clase

Definición

Representa un comando en un menú contextual.

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
Herencia
Object Platform::Object IInspectable UICommand
Atributos
Implementaciones

Requisitos de Windows

Familia de dispositivos
Windows 10 (se introdujo en la versión 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (se introdujo en la versión v1.0)

Comentarios

Utilice la propiedad PopupMenu.Commands para agregar o modificar los comandos en un menú contextual.

Constructores

UICommand()

Crea una nueva instancia de la clase UICommand .

UICommand(String)

Crea una nueva instancia de la clase UICommand con la etiqueta especificada.

UICommand(String, UICommandInvokedHandler)

Crea una nueva instancia de la clase UICommand mediante la etiqueta y el controlador de eventos especificados.

UICommand(String, UICommandInvokedHandler, Object)

Crea una nueva instancia de la clase UICommand con la etiqueta, el controlador de eventos y el identificador de comando especificados.

Propiedades

Id

Obtiene o establece el identificador del comando.

Invoked

Obtiene o establece el controlador para el evento que se desencadena cuando el usuario selecciona uiCommand.

Label

Obtiene o establece la etiqueta del comando.

Se aplica a

Consulte también