categoryModel.IsExpanded doesn't work

Grids for WPF Forum

Posted 6 years ago by Antoine Picard
Version: 18.1.0673
Platform: .NET 4.7
Environment: Windows 10 (64-bit)

Hi !

I wanted to have all my categories collapsed by default so I tried something like

protected override ICategoryModel CreateCategoryModel(string name, IDataFactoryRequest request)
 var categoryModel = base.CreateCategoryModel(name, request);
 categoryModel.IsExpanded = false;
 return categoryModel;

 in my dataFactory, but it doesn't work.

What do I do wrong ?

Comments (1)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Antoine,

The PropertyGrid.AreCategoriesAutoExpanded property defaults to true.  When true, it will auto-expand categories after you create them.  You'd want to set that property to false if you want them collapsed.  Then you could remove your code above.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.