2025-02-10 20:53:40 +08:00
|
|
|
|
using System.Windows;
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
2025-04-24 20:56:44 +08:00
|
|
|
|
namespace ShrlAlgoToolkit.Mvvm.Assists
|
2024-09-22 11:05:41 +08:00
|
|
|
|
{
|
2024-10-27 00:19:48 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 绑定代理,用来传递绑定对象
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class BindingProxy : Freezable
|
|
|
|
|
|
{
|
|
|
|
|
|
protected override Freezable CreateInstanceCore() => new BindingProxy();
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
2024-10-27 00:19:48 +08:00
|
|
|
|
public object Data
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return GetValue(DataProperty); }
|
|
|
|
|
|
set { SetValue(DataProperty, value); }
|
|
|
|
|
|
}
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
2024-10-27 00:19:48 +08:00
|
|
|
|
public static readonly DependencyProperty DataProperty = DependencyProperty.Register(
|
|
|
|
|
|
nameof(Data),
|
|
|
|
|
|
typeof(object),
|
|
|
|
|
|
typeof(BindingProxy)
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
2024-09-22 11:05:41 +08:00
|
|
|
|
}
|