| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
-
- namespace Perspex
- {
- using System;
- /// <summary>
- /// Interface for getting/setting <see cref="PerspexProperty"/> bindings on an object.
- /// </summary>
- public interface IObservablePropertyBag : IPropertyBag
- {
- /// <summary>
- /// Binds a <see cref="PerspexProperty"/> to an observable.
- /// </summary>
- /// <param name="property">The property.</param>
- /// <param name="source">The observable.</param>
- /// <param name="priority">The priority of the binding.</param>
- /// <returns>
- /// A disposable which can be used to terminate the binding.
- /// </returns>
- IDisposable Bind(
- PerspexProperty property,
- IObservable<object> source,
- BindingPriority priority = BindingPriority.LocalValue);
- /// <summary>
- /// Binds a <see cref="PerspexProperty"/> to an observable.
- /// </summary>
- /// <typeparam name="T">The type of the property.</typeparam>
- /// <param name="property">The property.</param>
- /// <param name="source">The observable.</param>
- /// <param name="priority">The priority of the binding.</param>
- /// <returns>
- /// A disposable which can be used to terminate the binding.
- /// </returns>
- IDisposable Bind<T>(
- PerspexProperty<T> property,
- IObservable<T> source,
- BindingPriority priority = BindingPriority.LocalValue);
- /// <summary>
- /// Gets an observable for a <see cref="PerspexProperty"/>.
- /// </summary>
- /// <param name="property">The property.</param>
- /// <returns>An observable.</returns>
- IObservable<object> GetObservable(PerspexProperty property);
- /// <summary>
- /// Gets an observable for a <see cref="PerspexProperty"/>.
- /// </summary>
- /// <typeparam name="T">The type of the property.</typeparam>
- /// <param name="property">The property.</param>
- /// <returns>An observable.</returns>
- IObservable<T> GetObservable<T>(PerspexProperty<T> property);
- }
- }
|