VisualTreeElementExtensions.GetVisualTreeElements Method

Definition

Overloads

GetVisualTreeElements(IVisualTreeElement, Point)

Gets list of a Visual Tree Element's children based off of a given Point.

GetVisualTreeElements(IVisualTreeElement, Rect)

Gets list of a Visual Tree Elements children based off of a rectangle.

GetVisualTreeElements(IVisualTreeElement, Double, Double)

Gets list of a Visual Tree Elements children based off of a given x, y point.

GetVisualTreeElements(IVisualTreeElement, Double, Double, Double, Double)

Gets list of a Visual Tree Elements children based off of a rectangle defined by its coordinates which are specified in platform units, not pixels.

GetVisualTreeElements(IVisualTreeElement, Point)

Source:
VisualTreeElementExtensions.cs
Source:
VisualTreeElementExtensions.cs

Gets list of a Visual Tree Element's children based off of a given Point.

C#
public static System.Collections.Generic.IReadOnlyList<Microsoft.Maui.IVisualTreeElement> GetVisualTreeElements (this Microsoft.Maui.IVisualTreeElement visualElement, Microsoft.Maui.Graphics.Point point);

Parameters

visualElement
IVisualTreeElement

IVisualTreeElement to scan.

point
Point

Point.

Returns

List of Children Elements.

Applies to

.NET MAUI 9 and .NET MAUI 8
Product Versions
.NET MAUI 8, 9

GetVisualTreeElements(IVisualTreeElement, Rect)

Source:
VisualTreeElementExtensions.cs
Source:
VisualTreeElementExtensions.cs

Gets list of a Visual Tree Elements children based off of a rectangle.

C#
public static System.Collections.Generic.IReadOnlyList<Microsoft.Maui.IVisualTreeElement> GetVisualTreeElements (this Microsoft.Maui.IVisualTreeElement visualElement, Microsoft.Maui.Graphics.Rect rectangle);

Parameters

visualElement
IVisualTreeElement

IVisualTreeElement to scan.

rectangle
Rect

The rectangle.

Returns

List of Children Elements.

Applies to

.NET MAUI 9 and .NET MAUI 8
Product Versions
.NET MAUI 8, 9

GetVisualTreeElements(IVisualTreeElement, Double, Double)

Source:
VisualTreeElementExtensions.cs
Source:
VisualTreeElementExtensions.cs

Gets list of a Visual Tree Elements children based off of a given x, y point.

C#
public static System.Collections.Generic.IReadOnlyList<Microsoft.Maui.IVisualTreeElement> GetVisualTreeElements (this Microsoft.Maui.IVisualTreeElement visualElement, double x, double y);

Parameters

visualElement
IVisualTreeElement

IVisualTreeElement to scan.

x
Double

The X point.

y
Double

The Y point.

Returns

List of Children Elements.

Applies to

.NET MAUI 9 and .NET MAUI 8
Product Versions
.NET MAUI 8, 9

GetVisualTreeElements(IVisualTreeElement, Double, Double, Double, Double)

Source:
VisualTreeElementExtensions.cs
Source:
VisualTreeElementExtensions.cs

Gets list of a Visual Tree Elements children based off of a rectangle defined by its coordinates which are specified in platform units, not pixels.

C#
public static System.Collections.Generic.IReadOnlyList<Microsoft.Maui.IVisualTreeElement> GetVisualTreeElements (this Microsoft.Maui.IVisualTreeElement visualElement, double x1, double y1, double x2, double y2);

Parameters

visualElement
IVisualTreeElement

IVisualTreeElement to scan.

x1
Double

The X coordinate of the top left point.

y1
Double

The Y coordinate of the top left point.

x2
Double

The X coordinate of the bottom right point.

y2
Double

The Y coordinate of the bottom right point.

Returns

List of Children Elements.

Applies to

.NET MAUI 9 and .NET MAUI 8
Product Versions
.NET MAUI 8, 9