expand categories

Grids for WPF Forum

Posted 9 years ago by Mary Fontana - Rudolph Technologies
I am using AreCategoriesAutoExpanded=true. I have a request to auto expand all but the Misc category when displayed. I'd appreciate help on how to collapse the misc category when first displayed.

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Mary,

You can include an implicit Style like so:
<Style TargetType="{x:Type propgrid:PropertyGridDataAccessorItem}">
                <Condition Binding="{Binding DataAccessorType, RelativeSource={RelativeSource Self}}" Value="Category" />
                <Condition Binding="{Binding DisplayName, RelativeSource={RelativeSource Self}}" Value="Misc" />
            <Setter Property="IsExpanded" Value="False" />

Actipro Software Support

Posted 4 years ago by IneedHelp

Could you please tell me how to achieve this in code behind?

My entire project is based on C# code. It's very hard to use documentation/forum examples when most of it is XAML.

Edit:  I found the solution in the SettingFocus\MainControl.xaml.cs sample file.  Thank you!

[Modified 4 years ago]

The latest build of this product (v2019.1 build 0686) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.