将 PropertyGrid 默认视图设置为 "category view"

Set PropertyGrid default view to "category view"

如何以编程方式或在设计时将 PropertyGrid 的视图设置为 "Category View"?
我只需单击 PropertyGrid 工具栏上的按钮,即可在 运行 时间内完成。

您可以在设计时或通过代码将 属性 网格的 PropertySort 属性 设置为 CategorizedCategorizedAlphabetical

this.propertyGrid1.PropertySort = PropertySort.Categorized;