共用方式為


CommandMapperExtensions.PrependToMapping 方法

定義

多載

PrependToMapping<TVirtualView,TViewHandler>(CommandMapper<TVirtualView,TViewHandler>, String, Action<TViewHandler,TVirtualView,Object>)

指定要在現有命令對應之前執行的方法。

PrependToMapping<TVirtualView,TViewHandler>(ICommandMapper<IElement,IElementHandler>, String, Action<TViewHandler,TVirtualView,Object>)

指定要在現有命令對應之前執行的方法,但如果類型不相符,請略過。

PrependToMapping<TVirtualView,TViewHandler>(ICommandMapper<TVirtualView,TViewHandler>, String, Action<TViewHandler,TVirtualView,Object>)

指定要在現有命令對應之前執行的方法。

PrependToMapping<TVirtualView,TViewHandler>(CommandMapper<TVirtualView,TViewHandler>, String, Action<TViewHandler,TVirtualView,Object>)

來源:
CommandMapperExtensions.cs
來源:
CommandMapperExtensions.cs

指定要在現有命令對應之前執行的方法。

public:
generic <typename TVirtualView, typename TViewHandler>
 where TVirtualView : Microsoft::Maui::IElement where TViewHandler : Microsoft::Maui::IElementHandler[System::Runtime::CompilerServices::Extension]
 static void PrependToMapping(Microsoft::Maui::CommandMapper<TVirtualView, TViewHandler> ^ commandMapper, System::String ^ key, Action<TViewHandler, TVirtualView, System::Object ^> ^ method);
public static void PrependToMapping<TVirtualView,TViewHandler> (this Microsoft.Maui.CommandMapper<TVirtualView,TViewHandler> commandMapper, string key, Action<TViewHandler,TVirtualView,object?> method) where TVirtualView : Microsoft.Maui.IElement where TViewHandler : Microsoft.Maui.IElementHandler;
static member PrependToMapping : Microsoft.Maui.CommandMapper<'VirtualView, 'ViewHandler (requires 'VirtualView :> Microsoft.Maui.IElement and 'ViewHandler :> 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 PrependToMapping(Of TVirtualView As IElement, TViewHandler As IElement) (commandMapper As CommandMapper(Of TVirtualView, TViewHandler), key As String, method As Action(Of TViewHandler, TVirtualView, Object))

類型參數

TVirtualView

跨平台類型。

TViewHandler

處理常式類型。

參數

commandMapper
CommandMapper<TVirtualView,TViewHandler>

要在其中變更對應的命令對應程式。

key
String

命令的名稱。

method
Action<TViewHandler,TVirtualView,Object>

在現有對應開始之前呼叫的方法。

適用於

PrependToMapping<TVirtualView,TViewHandler>(ICommandMapper<IElement,IElementHandler>, String, Action<TViewHandler,TVirtualView,Object>)

來源:
CommandMapperExtensions.cs
來源:
CommandMapperExtensions.cs

指定要在現有命令對應之前執行的方法,但如果類型不相符,請略過。

public:
generic <typename TVirtualView, typename TViewHandler>
 where TVirtualView : Microsoft::Maui::IElement where TViewHandler : Microsoft::Maui::IElementHandler[System::Runtime::CompilerServices::Extension]
 static void PrependToMapping(Microsoft::Maui::ICommandMapper<Microsoft::Maui::IElement ^, Microsoft::Maui::IElementHandler ^> ^ commandMapper, System::String ^ key, Action<TViewHandler, TVirtualView, System::Object ^> ^ method);
public static void PrependToMapping<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 PrependToMapping : 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 PrependToMapping(Of TVirtualView As IElement, TViewHandler As IElement) (commandMapper As ICommandMapper(Of IElement, IElementHandler), key As String, method As Action(Of TViewHandler, TVirtualView, Object))

類型參數

TVirtualView

跨平台類型。

TViewHandler

處理常式類型。

參數

commandMapper
ICommandMapper<IElement,IElementHandler>

要在其中變更對應的命令對應程式。

key
String

命令的名稱。

method
Action<TViewHandler,TVirtualView,Object>

在現有對應開始之前呼叫的方法。

適用於

PrependToMapping<TVirtualView,TViewHandler>(ICommandMapper<TVirtualView,TViewHandler>, String, Action<TViewHandler,TVirtualView,Object>)

來源:
CommandMapperExtensions.cs
來源:
CommandMapperExtensions.cs

指定要在現有命令對應之前執行的方法。

public:
generic <typename TVirtualView, typename TViewHandler>
 where TVirtualView : Microsoft::Maui::IElement where TViewHandler : Microsoft::Maui::IElementHandler[System::Runtime::CompilerServices::Extension]
 static void PrependToMapping(Microsoft::Maui::ICommandMapper<TVirtualView, TViewHandler> ^ commandMapper, System::String ^ key, Action<TViewHandler, TVirtualView, System::Object ^> ^ method);
public static void PrependToMapping<TVirtualView,TViewHandler> (this Microsoft.Maui.ICommandMapper<TVirtualView,TViewHandler> commandMapper, string key, Action<TViewHandler,TVirtualView,object?> method) where TVirtualView : Microsoft.Maui.IElement where TViewHandler : Microsoft.Maui.IElementHandler;
static member PrependToMapping : Microsoft.Maui.ICommandMapper<'VirtualView, 'ViewHandler (requires 'VirtualView :> Microsoft.Maui.IElement and 'ViewHandler :> 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 PrependToMapping(Of TVirtualView As IElement, TViewHandler As IElement) (commandMapper As ICommandMapper(Of TVirtualView, TViewHandler), key As String, method As Action(Of TViewHandler, TVirtualView, Object))

類型參數

TVirtualView

跨平台類型。

TViewHandler

處理常式類型。

參數

commandMapper
ICommandMapper<TVirtualView,TViewHandler>

要在其中變更對應的命令對應程式。

key
String

命令的名稱。

method
Action<TViewHandler,TVirtualView,Object>

在現有對應開始之前呼叫的方法。

適用於