Files

37 lines
928 B
C#
Raw Permalink Normal View History

2025-12-23 21:35:54 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2026-01-02 17:30:41 +08:00
namespace Melskin.Assists
2025-12-23 21:35:54 +08:00
{
/// <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)
);
}
}