// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Perspex.Data;
namespace Perspex
{
///
/// Interface for getting/setting values on an object.
///
public interface IPerspexObject
{
///
/// Raised when a value changes on this object.
///
event EventHandler PropertyChanged;
///
/// Gets a value.
///
/// The property.
/// The value.
object GetValue(PerspexProperty property);
///
/// Gets a value.
///
/// The type of the property.
/// The property.
/// The value.
T GetValue(PerspexProperty property);
///
/// Checks whether a is set on this object.
///
/// The property.
/// True if the property is set, otherwise false.
bool IsSet(PerspexProperty property);
///
/// Sets a value.
///
/// The property.
/// The value.
/// The priority of the value.
void SetValue(
PerspexProperty property,
object value,
BindingPriority priority = BindingPriority.LocalValue);
///
/// Sets a value.
///
/// The type of the property.
/// The property.
/// The value.
/// The priority of the value.
void SetValue(
PerspexProperty property,
T value,
BindingPriority priority = BindingPriority.LocalValue);
///
/// Binds a to an observable.
///
/// The property.
/// The observable.
/// The priority of the binding.
/// The validation methods of the binding.
///
/// A disposable which can be used to terminate the binding.
///
IDisposable Bind(
PerspexProperty property,
IObservable