ControlExtensionsSet Method

Sets a pseudoclass depending on an observable trigger.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public static IDisposable Set(
	this IPseudoClasses classes,
	string name,
	IObservable<bool> trigger
)

Parameters

classes  IPseudoClasses
The pseudoclasses collection.
name  String
The name of the pseudoclass to set.
trigger  IObservableBoolean
The trigger: true adds the pseudoclass, false removes.

Return Value

IDisposable
A disposable used to cancel the subscription.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IPseudoClasses. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also