WPF扩展工具包PropertyGrid - 自定义编辑器 [英] WPF Extended Toolkit PropertyGrid - Custom Editor
问题描述
我在WPF扩展工具包(v1.70)中使用 PropertyGrid
控件。
我的 SourceObject
中有一个 Image
属性,我需要启动一个对话框才能选择一个图像对于那个属性。我指出我需要从 DialogPropertyValueEditor
派生自定义编辑器,但我有一个额外的要求。
我需要能够在 PropertyGrid
(或绑定的 SourceObject
)中使用其他两个属性才能正确使用初始化允许选择图像的表格。
如何做到这一点?
此外,我将此属性添加到 SourceObject
中的 Image
属性,但我没有看到( Image
)属性网格中列出的属性。为什么不显示在属性网格中?
I'm using the PropertyGrid
control in the WPF Extended Toolkit (v1.70).
I have an Image
property in my SourceObject
, and I need to fire up a dialog box in order to select an image for that property. I fingered out that I need to derive a custom editor from DialogPropertyValueEditor
, but I have an additional requirement.
I need to be able to use two other properties in the PropertyGrid
(or in the bound SourceObject
) in order to properly initialize the form that allows the selection of an image.
How do I go about doing that?
Also, I added this attribute to the Image
property in the SourceObject
, but I didn't see that (Image
) property listed in the property grid. Why isn't that showing up in the property grid?
[Editor("CDSceneSelector", "DialogPropertyValueEditor")]
[Category("General")]
public Image BaseImage
{
get...
set...
}
推荐答案
你有没有解决这个问题?我在想自定义编辑器。
Did you solve this already? I was thinking of custom editor.
这篇关于WPF扩展工具包PropertyGrid - 自定义编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!