New to Telerik UI for .NET MAUIStart a free 30-day trial

Provides a base class for Telerik MAUI view handlers that manage the mapping between virtual views and native platform views. This abstract class extends to provide common functionality for Telerik controls.

Definition

Namespace:Telerik.Maui.Handlers

Assembly:Telerik.Maui.Core.dll

Type Parameters:

IVirtualElement

The type of the virtual view that implements IView.

TNativeView

The type of the native platform view.

Syntax:

C#
public abstract class RadViewHandler<IVirtualElement, TNativeView> : ViewHandler<IVirtualElement, TNativeView> where IVirtualElement : class, IView where TNativeView : View

Inheritance: objectRadViewHandler<IVirtualElement, TNativeView>

Derived Classes: AppointmentViewHandlerRadItemsControlHandlerRadScrollViewHandlerSchedulerBoxViewHandler

Constructors

Initializes a new instance of the RadViewHandler<IVirtualElement, TNativeView> class with the specified property mapper.

C#
protected RadViewHandler(PropertyMapper mapper)
Parameters:mapperPropertyMapper

The PropertyMapper that defines how virtual view properties are mapped to native view properties.

Methods

Validates that the handler and virtual element parameters are not null. This method is used internally to ensure proper parameter validation across handler methods.

C#
public static void CheckParameters(IViewHandler handler, IView virtualElement)
Parameters:handlerIViewHandler

The IViewHandler to validate.

virtualElementIView

The IView to validate.

Exceptions:

ArgumentNullException

Thrown when either handler or virtualElement is null.

Creates the platform-specific view for this handler. This method calls CreateNativeViewOverride() and ensures memory tracking for the created view.

C#
protected override TNativeView CreatePlatformView()
Returns:

TNativeView

The platform-specific native view instance.