更新整理
This commit is contained in:
25
ShrlAlgoToolkit.Mvvm/Assists/BindingProxy.cs
Normal file
25
ShrlAlgoToolkit.Mvvm/Assists/BindingProxy.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for Data. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty DataProperty = DependencyProperty.Register(
|
||||
nameof(Data),
|
||||
typeof(object),
|
||||
typeof(BindingProxy)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user