25 lines
632 B
C#
25 lines
632 B
C#
using System.Windows;
|
|
|
|
namespace ShrlAlgoToolkit.Mvvm.Assists
|
|
{
|
|
/// <summary>
|
|
/// 绑定代理,用来传递绑定对象
|
|
/// </summary>
|
|
public class BindingProxy : Freezable
|
|
{
|
|
protected override Freezable CreateInstanceCore() => new BindingProxy();
|
|
|
|
public object Data
|
|
{
|
|
get { return GetValue(DataProperty); }
|
|
set { SetValue(DataProperty, value); }
|
|
}
|
|
|
|
public static readonly DependencyProperty DataProperty = DependencyProperty.Register(
|
|
nameof(Data),
|
|
typeof(object),
|
|
typeof(BindingProxy)
|
|
);
|
|
}
|
|
}
|