IBlazorWebViewHandler Interface

Definition

Defines the operations required by a handler for IBlazorWebView.

public interface class IBlazorWebViewHandler : Microsoft::Maui::IViewHandler
public interface IBlazorWebViewHandler : Microsoft.Maui.IViewHandler
type IBlazorWebViewHandler = interface
    interface IViewHandler
    interface IElementHandler
Public Interface IBlazorWebViewHandler
Implements IViewHandler
Derived
Implements

Remarks

On Windows, an implementation that owns a WebView2 must either expose it directly as its PlatformView so the framework can close it when the window is destroyed, or close the wrapped control from its own disconnect logic. This preserves the built-in workaround for microsoft-ui-xaml issue 6872.

Properties

Name Description
ContainerView

Gets the container view for this view.

(Inherited from IViewHandler)
HasContainer

Gets or sets a value that indicates whether the PlatformView is contained within a view.

(Inherited from IViewHandler)
MauiContext

Gets the .NET MAUI context associated with the element.

(Inherited from IElementHandler)
PlatformView

Gets the platform-specific view object associated with the handler.

(Inherited from IElementHandler)
VirtualView

Gets the virtual view (.NET MAUI layer) that is managed by this handler.

(Inherited from IViewHandler)

Methods

Name Description
CreateFileProvider(String)

Creates the file provider used to serve static web assets.

DisconnectHandler()

Disconnects the element handler from the element for clean up.

(Inherited from IElementHandler)
GetDesiredSize(Double, Double)

Computes the actual size of a view based on the desired size and constraints.

(Inherited from IViewHandler)
Invoke(String, Object)

Invokes the specified command on the element with the given arguments.

(Inherited from IElementHandler)
PlatformArrange(Rect)

Positions child elements and determines a size for a view.

(Inherited from IViewHandler)
SetMauiContext(IMauiContext)

Sets the .NET MAUI context for the element handler.

(Inherited from IElementHandler)
SetVirtualView(IElement)

Sets the cross-platform virtual view associated with the handler.

(Inherited from IElementHandler)
TryDispatchAsync(Action<IServiceProvider>)

Dispatches work to the scoped services available to Razor components.

UpdateValue(String)

Updates the value of the specified property on the handler.

(Inherited from IElementHandler)

Extension Methods

Name Description
GetRequiredService<T>(IElementHandler, Type)
GetRequiredService<T>(IElementHandler)
GetService<T>(IElementHandler, Type)
GetService<T>(IElementHandler)
GetServiceProvider(IElementHandler)
IsConnected(IElementHandler)

Applies to