Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2035
Conditionally collapse a category
posted

Is there a way to conditionally collapse a category in the xamPropertyGrid at runtime?

Regards,

Arthur

Parents
  • 16495
    Verified Answer
    Offline posted

    Hello Arthur,

     

    Thank you for your post.

     

    I have created a short project in order to show you how you can achieve the functionality you are looking for. Basically in the sample application I created style for PropertyGridCategoryItemView in the resources of XamPropertyGrid and handled its Loaded event in EventSetter. In the event handler of Loaded event I got the Category I want by the DisplayName property of PropertyGridCategoryItemView.  Then I get its ToggleButton from the visual tree by using GetDescendantFromType method of our Utilities class and set its IsChecked property to false in order to Collapse the category. Please take a look at the attached sample application and let me know if I am missing something from your scenario.

     

    Please let  me know if you require any further assistance in the matter  I will be glad to help.

    CollapseCategory.zip
Reply Children
No Data