- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在 WinForms 中使用 PropertyGrid
。我可以更改默认的 CollectionEditor
吗?我可以通过 Editor
属性显示自定义 CollectionEditor
,如下所示:
[Editor("MyProgram.CustomCollectionEditor , MyProgram, Version=1.0.0.0, Culture=neutral, PublicKeyToken=neutral", typeof(UITypeEditor))]
但我不想将它用于所有属性。
最佳答案
您可以在属性上使用 EditorAttribute
,这样只有应用了该属性的属性才有自定义编辑器。
我认为How to: Take control over the Collection Editor's PropertyGrid可能对您要实现的目标有所帮助。
关于c# - 如何更改 PropertyGrid 的默认 CollectionEditor?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14319814/
我正在用可以让我更好地自定义 UI 的东西替换我的属性网格。我在我的表单上放置了一个按钮,我希望点击它时会弹出一个 CollectionEditor 并允许我修改我的代码。当我使用 PropertyG
我有这样的属性: [Editor(typeof(LayerCollection), typeof(UITypeEditor))] public List Layers { get { return l
请先阅读整个问题以了解在哪里我可以重置属性的默认值。 当定义一个可以可视化设计的自定义类时,可以使用以下模式实现一个集合编辑器来修改列表、数组、集合等属性: [Editor(typeof(Collec
谁能用通俗易懂的语言告诉我CollectionEditor的内部工作机制? 我已经实现了每一个虚函数并且进入了每一个。仍然不知道其预期算法。我在网上搜索了很多关于 CollectionEditor 类
我在 WinForms 中使用 PropertyGrid。我可以更改默认的 CollectionEditor 吗?我可以通过 Editor 属性显示自定义 CollectionEditor,如下所示:
我有一个组件,其中有 List属性(property)。列表中的类的每个属性都用描述属性修饰,但描述不会显示在集合编辑器中 在 IDE 设计器中,有没有办法打开标准集合编辑器中的“描述”面板?我需要从
我正在使用 PropertyGrid 编辑包含集合的对象。使用 CollectionEditor 编辑集合。我必须确保集合中的元素是唯一的。 如何向 CollectionEditor 添加验证: 通过
我有一个用户控件,它有一个属性,该属性是自定义对象类型的列表。当我通过从 List<> 继承来创建自定义类时,它主要起作用: public class CustomCol : List {
为了设计时支持,我正在实现一个 CollectionEditor,如下所示: class CustomCollectionEditor : CollectionEditor { ...
我有很久以前从某个地方抓取的这个自定义控件: public class NotifyingCollectionEditor : CollectionEditor { // Define a s
我已经创建了自定义控件。它有一个名为“Tab”的属性。此属性将从“DockContainerItem”类继承的“FloorsInformation”控件集合添加到我的自定义控件。 现在,我想在单击选项
我有一个用户控件,它使用 CollectionEditor 的属性。我正在同一解决方案中使用另一个项目来测试控件。我的集合编辑器没有问题,除了在我重新编译组件 dll 后 IDE 在设计时给出错误。如
使用 Extended WPF Toolkit 中的 PropertyGrid,我需要使用 CollectionEditor: [Editor(typeof(CollectionEditor), ty
我有一个自定义控件,它的属性类型为 Collection .当我使用 CollectionEditor要编辑此属性,CollectionEditor窗口显示"Object does not match
我是一名优秀的程序员,十分优秀!