add PropertyGrid v1

This commit is contained in:
NaBian committed 2020-06-19 01:15:47 +08:00
1 parent dea3287619
commit 0660a60e27
12 files changed
+90 -22

No files matched your search

@@ -1,10 +1,30 @@
namespace HandyControlDemo.UserControl
using System.Windows;
using HandyControlDemo.Data;
namespace HandyControlDemo.UserControl
{
public partial class PropertyGridDemoCtl
{
public PropertyGridDemoCtl()
{
InitializeComponent();
DemoModel = new PropertyGridDemoModel
{
Name = "TestName",
Gender = Gender.Female,
IsPassed = true,
Score = 98
};
}
public static readonly DependencyProperty DemoModelProperty = DependencyProperty.Register(
"DemoModel", typeof(PropertyGridDemoModel), typeof(PropertyGridDemoCtl), new PropertyMetadata(default(PropertyGridDemoModel)));
public PropertyGridDemoModel DemoModel
{
get => (PropertyGridDemoModel) GetValue(DemoModelProperty);
set => SetValue(DemoModelProperty, value);
}
}
}