IStyleActivator Interface

Summary

Defines a style activator.
Namespace
Avalonia.Styling.Activators
Interfaces
  • IDisposable
graph BT Type-.->Interface0["IDisposable"] Type["IStyleActivator"] class Type type-node

Syntax

public interface IStyleActivator : IDisposable

Remarks

A style activator is very similar to an `IObservable{bool}` but is optimized for the particular use-case of activating a style according to a selector. It differs from an observable in two major ways: - Can only have a single subscription - The subscription can have a tag associated with it, allowing a subscriber to index into a list of subscriptions without having to allocate additional objects.

Methods

Name Value Summary
Subscribe(IStyleActivatorSink, int) void
Subscribes to the activator.
Unsubscribe(IStyleActivatorSink) void
Unsubscribes from the activator.