Compartilhar via


CoreWebView2CompositionController.RootVisualTarget Property

Definition

Gets or sets the root visual in the hosting app's visual tree.

public object RootVisualTarget { get; set; }
member this.RootVisualTarget : obj with get, set
Public Property RootVisualTarget As Object

Property Value

Remarks

This visual is where the WebView will connect its visual tree. The app uses this visual to position the WebView within the app. The app still needs to use the Bounds property to size the WebView. The RootVisualTarget property can be an IDCompositionVisual or a Windows::UI::Composition::ContainerVisual. WebView will connect its visual tree to the provided visual before returning from the property setter. The app needs to commit on its device setting the RootVisualTarget property. The RootVisualTarget property supports being set to null to disconnect the WebView from the app's visual tree.

Applies to