Table of Contents

Class VisualStateGroup

Namespace
Icy.UI.Styles
Assembly
IcyUI.dll

Represents a mutually-exclusive set of VisualStates - at most one state within a group is active on a given element at a time.

[ContentProperty("States")]
public class VisualStateGroup
Inheritance
VisualStateGroup
Inherited Members
Extension Methods

Remarks

Separate groups are independent: an element has one active state per group, so states that must combine (a hover background and a focus border) belong in different groups. When two active states in different groups set the same property, the group registered later wins.

Properties

Name

Gets the optional name of this group.

public string? Name { get; init; }

Property Value

string

Remarks

The name is what lets a style override a group: registering a group on an element replaces the group with the same name already registered there (see RegisterStateGroup(VisualStateGroup)). Since a BasedOn base and the theme's style register before the style itself, a style's CommonStates group replaces the theme's CommonStates instead of adding to it.

A group with no name (null or empty) never replaces another group.

States

Gets the states within this group.

public List<VisualState> States { get; }

Property Value

List<VisualState>