Skip to main content

SelectableMixin Class

Adds selectable functionality to control classes.

Definition

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

public static class SelectableMixin
View Source
InheritanceObject → SelectableMixin

Remarks

The SelectableMixin adds behavior to a control which can be selected. It adds the following behavior:

  • Raises an IsSelectedChangedEvent when the value if the IsSelected property changes.
  • Adds a 'selected' class to selected controls.
  • Requests that the control is scrolled into view when focused.

Mixins apply themselves to classes and not instances, and as such should be created in a static constructor.

Methods

Attach(TControl)(AvaloniaProperty(Boolean))Initializes a new instance of the SelectableMixin class.

See Also

Reference

Avalonia.Controls.Mixins Namespace