Table of Contents

Class VisualState<TTarget>

Namespace
Icy.UI.Styles
Assembly
IcyUI.dll

A strongly-typed, fluent builder over VisualState, mirroring Style<TTarget>'s compile-time-checked property references for defining state setters in C# code.

public class VisualState<TTarget> : VisualState where TTarget : UIElement

Type Parameters

TTarget

The type of element this state is meant to be applied to.

Inheritance
VisualState<TTarget>
Inherited Members
Extension Methods

Constructors

VisualState(ControlState)

Initializes a new instance of the VisualState<TTarget> class.

public VisualState(ControlState state)

Parameters

state ControlState

The combination of ControlState flags this state responds to.

Methods

Set<TValue>(Expression<Func<TTarget, TValue>>, TValue)

Sets the value a property this state should have while active, and returns this state for further chaining.

public VisualState<TTarget> Set<TValue>(Expression<Func<TTarget, TValue>> property, TValue value)

Parameters

property Expression<Func<TTarget, TValue>>

A simple property-access expression identifying the property to set, e.g. x => x.Background.

value TValue

The value to set.

Returns

VisualState<TTarget>

This state, for fluent chaining.

Type Parameters

TValue

The type of the property's value.