IRenderRoot Interface

Summary

Represents the root of a renderable tree.
graph TD Interface0["IVisual"]-.->Type click Interface0 "/api/Avalonia.VisualTree/IVisual" Type["IRenderRoot"] class Type type-node Type-.->Implementing0["ReactiveWindow<TViewModel>"] click Implementing0 "/api/Avalonia/ReactiveWindow_1" Type-.->Implementing1["WindowBase"] click Implementing1 "/api/Avalonia.Controls/WindowBase" Type-.->Implementing2["PopupRoot"] click Implementing2 "/api/Avalonia.Controls.Primitives/PopupRoot" Type-.->Implementing3["Window"] click Implementing3 "/api/Avalonia.Controls/Window" Type-.->Implementing4["TopLevel"] click Implementing4 "/api/Avalonia.Controls/TopLevel" Type-.->Implementing5["EmbeddableControlRoot"] click Implementing5 "/api/Avalonia.Controls.Embedding/EmbeddableControlRoot"

Syntax

public interface IRenderRoot : IVisual

Properties

Name Value Summary
ClientSize Size
Gets the client size of the window.
Renderer IRenderer
Gets the renderer for the window.
RenderScaling double
The scaling factor to use in rendering.

Methods

Name Value Summary
CreateRenderTarget() IRenderTarget
Creates a render target for the window.
Invalidate(Rect) void
Adds a rectangle to the window's dirty region.
PointToClient(PixelPoint) Point
Converts a point from screen to client coordinates.
PointToScreen(Point) PixelPoint
Converts a point from client to screen coordinates.

Extension Methods

Name Value Summary
CalculateDistanceFromAncestor(IVisual) int
Calculates the distance from a visual's IRenderRoot.
FindCommonVisualAncestor(IVisual) IVisual
Tries to get the first common ancestor of two visuals.
GetSelfAndVisualAncestors() IEnumerable<IVisual>
Enumerates an IVisual and its ancestors in the visual tree.
GetSelfAndVisualDescendants() IEnumerable<IVisual>
Enumerates an IVisual and its descendants in the visual tree.
GetVisualAncestors() IEnumerable<IVisual>
Enumerates the ancestors of an IVisual in the visual tree.
GetVisualAt(Point) IVisual
Gets the first visual in the visual tree whose bounds contain a point.
GetVisualChildren() IEnumerable<IVisual>
Enumerates the children of an IVisual in the visual tree.
GetVisualDescendants() IEnumerable<IVisual>
Enumerates the descendants of an IVisual in the visual tree.
GetVisualParent() IVisual
Gets the visual parent of an IVisual.
GetVisualParent<T>() T
Gets the visual parent of an IVisual.
GetVisualRoot() IRenderRoot
Gets the root visual for an IVisual.
GetVisualsAt(Point) IEnumerable<IVisual>
Enumerates the visible visuals in the visual tree whose bounds contain a point.
GetVisualsAt(Point, Func<IVisual, bool>) IEnumerable<IVisual>
Enumerates the visuals in the visual tree whose bounds contain a point.
IsVisualAncestorOf(IVisual) bool
Tests whether an IVisual is an ancestor of another visual.
PointToClient(PixelPoint) Point
Converts a point from screen to client coordinates.
PointToScreen(Point) PixelPoint
Converts a point from client to screen coordinates.
TranslatePoint(Point, IVisual) Point
Translates a point relative to this visual to coordinates that are relative to the specified visual. The visual and relativeTo should be descendants of the same root window