PropertyMapperExtensions.ReplaceMapping<TVirtualView,TViewHandler> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Replace a property mapping in place but call the previous mapping if the types do not match.
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::IPropertyMapper<Microsoft::Maui::IElement ^, Microsoft::Maui::IElementHandler ^> ^ propertyMapper, System::String ^ key, Action<TViewHandler, TVirtualView> ^ method);
public static void ReplaceMapping<TVirtualView,TViewHandler> (this Microsoft.Maui.IPropertyMapper<Microsoft.Maui.IElement,Microsoft.Maui.IElementHandler> propertyMapper, string key, Action<TViewHandler,TVirtualView> method) where TVirtualView : Microsoft.Maui.IElement where TViewHandler : Microsoft.Maui.IElementHandler;
static member ReplaceMapping : Microsoft.Maui.IPropertyMapper<Microsoft.Maui.IElement, Microsoft.Maui.IElementHandler> * string * Action<'ViewHandler, 'VirtualView (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) (propertyMapper As IPropertyMapper(Of IElement, IElementHandler), key As String, method As Action(Of TViewHandler, TVirtualView))
Type Parameters
- TVirtualView
The cross-platform type.
- TViewHandler
The handler type.
Parameters
- propertyMapper
- IPropertyMapper<IElement,IElementHandler>
The property mapper in which to change the mapping.
- key
- String
The name of the property.
- method
- Action<TViewHandler,TVirtualView>
The modified method to call when the property is updated.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.