问题描述
我想使用 来修改从 json 加载的对象的某个属性。但在我的情况下,一些属性是一个类的实例,它也有自己的属性。 我尝试自定义编辑器以显示这些子属性:
<xctk:EditorTemplateDeFinition TargetProperties="SystemParameter">
<xctk:EditorTemplateDeFinition.EditingTemplate>
<DataTemplate>
<Button Command="ExpandCommand" CommandParameter="{Binding Value}">...</Button>
</DataTemplate>
</xctk:EditorTemplateDeFinition.EditingTemplate>
</xctk:EditorTemplateDeFinition>
var win = new MainWindow();
win.SetSelectedobject(JsonConvert.DeserializeObject(e.Parameter.ToString()));
win.ShowDialog();
它可以工作,但我无法将修改提交到第一级窗口。因此,如果更改了子属性,我将无法保存此修改。
我的问题是: 如何使用具有级联属性的 [PropertyGrid]? 我的解决方案对吗?如果是,如何保存对子属性的修改?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)