Table of Contents

Class ElementExtensions

Namespace
MLEM.Ui.Elements
Assembly
MLEM.Ui.dll

This class contains a set of extensions for dealing with Element objects

public static class ElementExtensions
Inheritance
ElementExtensions
Inherited Members

Methods

AddTooltip(Element, TextCallback)

Adds a new Tooltip to the given element using the Tooltip(TextCallback, Element) constructor

public static Tooltip AddTooltip(this Element element, Paragraph.TextCallback textCallback)

Parameters

element Element

The element to add the tooltip to

textCallback Paragraph.TextCallback

The text to display on the tooltip

Returns

Tooltip

The created tooltip instance

AddTooltip(Element, Tooltip)

Adds the given Tooltip to the given element

public static Tooltip AddTooltip(this Element element, Tooltip tooltip)

Parameters

element Element

The element to add the tooltip to

tooltip Tooltip

The tooltip to add

Returns

Tooltip

The passed tooltip, for chaining

AddTooltip(Element, string)

Adds a new Tooltip to the given element using the Tooltip(string, Element) constructor

public static Tooltip AddTooltip(this Element element, string text)

Parameters

element Element

The element to add the tooltip to

text string

The text to display on the tooltip

Returns

Tooltip

The created tooltip instance

IsAuto(Anchor)

Returns whether the given Anchor is automatic. The anchors AutoLeft, AutoCenter, AutoRight, and any anchor that IsInline(Anchor) will return true.

public static bool IsAuto(this Anchor anchor)

Parameters

anchor Anchor

The anchor to query.

Returns

bool

Whether the given anchor is automatic.

IsIgnoreOverflow(Anchor)

Returns whether the given Anchor ignores overflow. The anchors AutoInlineIgnoreOverflow, AutoInlineCenterIgnoreOverflow, and AutoInlineBottomIgnoreOverflow will return true.

public static bool IsIgnoreOverflow(this Anchor anchor)

Parameters

anchor Anchor

The anchor to query.

Returns

bool

Whether the given anchor ignores overflow.

IsInline(Anchor)

Returns whether the given Anchor is inline. The anchors AutoInline, AutoInlineCenter, AutoInlineBottom, and any anchor that IsIgnoreOverflow(Anchor) will return true.

public static bool IsInline(this Anchor anchor)

Parameters

anchor Anchor

The anchor to query.

Returns

bool

Whether the given anchor is inline.

IsLeftAligned(Anchor)

Returns whether the given Anchor is left-aligned for the purpose of GetRightmostChild(Func<Element, bool>, bool). The anchors TopLeft, CenterLeft, BottomLeft, AutoLeft, and any anchor that IsInline(Anchor) will return true.

public static bool IsLeftAligned(this Anchor anchor)

Parameters

anchor Anchor

The anchor to query.

Returns

bool

Whether the given anchor is left-aligned.

IsTopAligned(Anchor)

Returns whether the given Anchor is top-aligned for the purpose of GetLowestChild(Func<Element, bool>, bool). The anchors TopLeft, TopCenter, TopRight, AutoLeft, AutoCenter, AutoRight, AutoInline and AutoInlineIgnoreOverflow will return true.

public static bool IsTopAligned(this Anchor anchor)

Parameters

anchor Anchor

The anchor to query.

Returns

bool

Whether the given anchor is top-aligned.