Skip to main content

Set Method

Sets a pseudoclass depending on an observable trigger.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public static IDisposable Set(
this IPseudoClasses classes,
string name,
IObservable<bool> trigger
)

Parameters

  IPseudoClasses
The pseudoclasses collection.
  String
The name of the pseudoclass to set.
  IObservable(Boolean)
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

Reference

ControlExtensions Class
Avalonia.Controls Namespace