add PropertyGrid v1
This commit is contained in:
1 parent
dea3287619
commit
0660a60e27
12 files changed
+90
-22
No files matched your search
+21
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user