Compartilhar via


CommandMapperExtensions.ReplaceMapping<TVirtualView,TViewHandler> Método

Definição

Substitua um mapeamento de comando em vigor, mas chame o mapeamento anterior se os tipos não corresponderem.

public:
generic <typename TVirtualView, typename TViewHandler>
 where TVirtualView : Microsoft::Maui::IElement where TViewHandler : Microsoft::Maui::IElementHandler[System::Runtime::CompilerServices::Extension]
 static void ReplaceMapping(Microsoft::Maui::ICommandMapper<Microsoft::Maui::IElement ^, Microsoft::Maui::IElementHandler ^> ^ commandMapper, System::String ^ key, Action<TViewHandler, TVirtualView, System::Object ^> ^ method);
public static void ReplaceMapping<TVirtualView,TViewHandler> (this Microsoft.Maui.ICommandMapper<Microsoft.Maui.IElement,Microsoft.Maui.IElementHandler> commandMapper, string key, Action<TViewHandler,TVirtualView,object?> method) where TVirtualView : Microsoft.Maui.IElement where TViewHandler : Microsoft.Maui.IElementHandler;
static member ReplaceMapping : Microsoft.Maui.ICommandMapper<Microsoft.Maui.IElement, Microsoft.Maui.IElementHandler> * string * Action<'ViewHandler, 'VirtualView, obj (requires 'ViewHandler :> Microsoft.Maui.IElementHandler and 'VirtualView :> Microsoft.Maui.IElement)> -> unit (requires 'VirtualView :> Microsoft.Maui.IElement and 'ViewHandler :> Microsoft.Maui.IElementHandler)
<Extension()>
Public Sub ReplaceMapping(Of TVirtualView As IElement, TViewHandler As IElement) (commandMapper As ICommandMapper(Of IElement, IElementHandler), key As String, method As Action(Of TViewHandler, TVirtualView, Object))

Parâmetros de tipo

TVirtualView

O tipo de plataforma cruzada.

TViewHandler

O tipo de manipulador.

Parâmetros

commandMapper
ICommandMapper<IElement,IElementHandler>

O mapeador de comando no qual alterar o mapeamento.

key
String

O nome do comando.

method
Action<TViewHandler,TVirtualView,Object>

O método modificado a ser chamado quando o comando é atualizado.

Aplica-se a