Skip to main content

Styles Class

Definition

Assembly:Avalonia.Base
Package:Avalonia
Source:Styles.cs

A style that consists of a number of child styles.

public class Styles

Inheritance: object -> AvaloniaObject -> Styles

Implements: IAvaloniaListItemValidator<IStyle>, IAvaloniaList<IStyle>, IAvaloniaReadOnlyList<IStyle>, IResourceNode, IResourceProvider, IStyle, ICollection<IStyle>, IEnumerable<IStyle>, IList<IStyle>, IReadOnlyCollection<IStyle>, IReadOnlyList<IStyle>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged

Constructors

NameDescription
Styles (2 overloads)No summary available.

Styles overloads

Styles Constructor

public Styles()

Styles Constructor

public Styles(Avalonia.Controls.IResourceHost owner)
Parameters

owner Avalonia.Controls.IResourceHost

Methods

NameDescription
AddNo summary available.
AddRangeNo summary available.
ClearNo summary available.
ContainsNo summary available.
CopyToNo summary available.
GetEnumeratorNo summary available.
IndexOfNo summary available.
InsertNo summary available.
InsertRangeNo summary available.
MoveNo summary available.
MoveRangeNo summary available.
RemoveNo summary available.
RemoveAllNo summary available.
RemoveAtNo summary available.
RemoveRangeNo summary available.
TryGetResourceNo summary available.
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject.
ClearValue (4 overloads)Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
GetBaseValueInherited from AvaloniaObject.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.

Add Method

public void Add(Avalonia.Styling.IStyle item)

Parameters

item Avalonia.Styling.IStyle

AddRange Method

public void AddRange(System.Collections.Generic.IEnumerable<Avalonia.Styling.IStyle> items)

Parameters

items System.Collections.Generic.IEnumerable<Avalonia.Styling.IStyle>

Clear Method

public void Clear()

Contains Method

public bool Contains(Avalonia.Styling.IStyle item)

Parameters

item Avalonia.Styling.IStyle

Returns

bool

CopyTo Method

public void CopyTo(Avalonia.Styling.IStyle[] array, int arrayIndex)

Parameters

array Avalonia.Styling.IStyle[]

arrayIndex int

GetEnumerator Method

public Avalonia.Collections.AvaloniaList<T>.Enumerator<T><Avalonia.Styling.IStyle> GetEnumerator()

Returns

Avalonia.Collections.AvaloniaList<T>.Enumerator<T><Avalonia.Styling.IStyle>

IndexOf Method

public int IndexOf(Avalonia.Styling.IStyle item)

Parameters

item Avalonia.Styling.IStyle

Returns

int

Insert Method

public void Insert(int index, Avalonia.Styling.IStyle item)

Parameters

index int

item Avalonia.Styling.IStyle

InsertRange Method

public void InsertRange(int index, System.Collections.Generic.IEnumerable<Avalonia.Styling.IStyle> items)

Parameters

index int

items System.Collections.Generic.IEnumerable<Avalonia.Styling.IStyle>

Move Method

public void Move(int oldIndex, int newIndex)

Parameters

oldIndex int

newIndex int

MoveRange Method

public void MoveRange(int oldIndex, int count, int newIndex)

Parameters

oldIndex int

count int

newIndex int

Remove Method

public bool Remove(Avalonia.Styling.IStyle item)

Parameters

item Avalonia.Styling.IStyle

Returns

bool

RemoveAll Method

public void RemoveAll(System.Collections.Generic.IEnumerable<Avalonia.Styling.IStyle> items)

Parameters

items System.Collections.Generic.IEnumerable<Avalonia.Styling.IStyle>

RemoveAt Method

public void RemoveAt(int index)

Parameters

index int

RemoveRange Method

public void RemoveRange(int index, int count)

Parameters

index int

count int

TryGetResource Method

public bool TryGetResource(object key, Avalonia.Styling.ThemeVariant theme, object& value)

Parameters

key object

theme Avalonia.Styling.ThemeVariant

value object&

Returns

bool

Properties

NameDescription
CountNo summary available.
ItemNo summary available.
OwnerNo summary available.
ResourcesGets or sets a dictionary of style resources.
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.

Count Property

public int Count { get; set; }

Item Property

public Avalonia.Styling.IStyle Item { get; set; }

Owner Property

public Avalonia.Controls.IResourceHost Owner { get; set; }

Resources Property

Gets or sets a dictionary of style resources.

public Avalonia.Controls.IResourceDictionary Resources { get; set; }

Events

NameDescription
CollectionChangedNo summary available.
OwnerChangedNo summary available.
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.

CollectionChanged Event

public event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged

OwnerChanged Event

public event EventHandler OwnerChanged