Table of Contents

Interface IStyleHost

Namespace
Avalonia.Styling
Assembly
Avalonia.Base.dll

Defines an element that has a Styles collection.

[NotClientImplementable]
public interface IStyleHost

Properties

IsStylesInitialized

Gets a value indicating whether Styles is initialized.

bool IsStylesInitialized { get; }

Property Value

bool

Remarks

The Styles property may be lazily initialized, if so this property indicates whether it has been initialized.

Styles

Gets the styles for the element.

Styles Styles { get; }

Property Value

Styles

StylingParent

Gets the parent style host element.

IStyleHost? StylingParent { get; }

Property Value

IStyleHost

Methods

StylesAdded(IReadOnlyList<IStyle>)

Called when styles are added to Styles or a nested styles collection.

void StylesAdded(IReadOnlyList<IStyle> styles)

Parameters

styles IReadOnlyList<IStyle>

The added styles.

StylesRemoved(IReadOnlyList<IStyle>)

Called when styles are removed from Styles or a nested styles collection.

void StylesRemoved(IReadOnlyList<IStyle> styles)

Parameters

styles IReadOnlyList<IStyle>

The removed styles.