// ----------------------------------------------------------------------- // // Copyright 2014 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- namespace Perspex.Styling { using System; /// /// Interface for styleable elements. /// public interface IStyleable { /// /// Gets the list of classes for the control. /// Classes Classes { get; } /// /// Gets the ID of the control. /// string Name { get; } /// /// Gets the type by which the control is styled. /// Type StyleKey { get; } /// /// Gets the template parent of this element if the control comes from a template. /// ITemplatedControl TemplatedParent { get; } /// /// Binds a to an observable. /// /// The type of the property. /// The property. /// The observable. /// The priority of the binding. /// /// A disposable which can be used to terminate the binding. /// IDisposable Bind(PerspexProperty property, IObservable source, BindingPriority priority); /// /// Gets an observable for a . /// /// The property. /// An observable. IObservable GetObservable(PerspexProperty property); /// /// Checks whether a is registered on this class. /// /// The property. /// True if the property is registered, otherwise false. bool IsRegistered(PerspexProperty property); /// /// Sets a value. /// /// The property. /// The value. /// The priority of the value. void SetValue(PerspexProperty property, object value, BindingPriority priority); } }