修复DataGrid列绑定是否显示的问题

This commit is contained in:
2025-07-10 12:26:18 +08:00
parent e2ba72ad1d
commit d360e583d2
2 changed files with 35 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
using System.Windows;
namespace PMSWPF.Extensions
{
public class BindingProxy : Freezable
{
// Using a DependencyProperty as the backing store for Data. This enables animation, styling, binding, etc...
public static readonly DependencyProperty DataProperty =
DependencyProperty.Register("Data", typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null));
public object Data
{
get { return (object)GetValue(DataProperty); }
set { SetValue(DataProperty, value); }
}
protected override Freezable CreateInstanceCore()
{
return new BindingProxy();
}
}
}