37 lines
928 B
C#
37 lines
928 B
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace Melskin.Assists
|
||
{
|
||
/// <summary>
|
||
/// 绑定代理,用来传递绑定对象
|
||
/// </summary>
|
||
public class BindingProxy : Freezable
|
||
{
|
||
/// <inheritdoc />
|
||
protected override Freezable CreateInstanceCore() => new BindingProxy();
|
||
|
||
/// <summary>
|
||
/// 绑定实例的数据
|
||
/// </summary>
|
||
public object Data
|
||
{
|
||
get => GetValue(DataProperty);
|
||
set { SetValue(DataProperty, value); }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 附加属性:Data
|
||
/// </summary>
|
||
public static readonly DependencyProperty DataProperty = DependencyProperty.Register(
|
||
nameof(Data),
|
||
typeof(object),
|
||
typeof(BindingProxy),
|
||
new PropertyMetadata(null)
|
||
);
|
||
}
|
||
}
|