Skip to main content

Set Method

Adds a or removes a style class to/from the collection.

Definition​

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

public void Set(
string name,
bool value
)

Parameters​

  String
The class names.
  Boolean
If true adds the class, if false, removes it.

Remarks​

Only standard classes may be added or removed via this method. To add pseudoclasses (classes beginning with a ':' character) use the protected PseudoClasses property.

See Also​

Reference​

Classes Class
Avalonia.Controls Namespace