This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, I'm using Mindscape PropertyGrid version 6.0. I would like to find an easy way to collapse all categories showed in the property grid after the "SelectObject" property has been set. |
|
|
Hello To make this easier for you, I've added a new property to the control called GroupExpanderMode. Set this to Collapsed so that when the SelectedObject changes, the category groups will initially appear as collapsed. This addition will be included in the next nightly build. The next nightly build will be available after 1200GMT and will be downloadable from here: http://www.mindscapehq.com/products/wpfelements/nightly-builds I've also added CollapseGroups and ExpandGroups methods to the PropertyGrid to give you additional control over the state of the category groups. One problem you will notice is that if you are using one of our provided themes, the category groups will animate closed. This is because the initial state of the groups are expanded in the property grid template, and the animations can not be controlled from the PropertyGrid. In order to remove or reverse this animation effect, you'll need to create a custom PropertyGrid style. This can be done by copying the relevant bits from one of the provided themes and then modifying them. You'll find the xaml files in the Themes folder of the WPF Elements install directory. Look for the files that end with .PropertyGrid.xaml. Let me know if you need any help removing or reversing the category animations. -Jason Fauchelle |
|
|
Hello, thank you for answer. I tried to use the new property GroupExpanderMode="Collapsed" but not working because the categories are showed all expanded also if didn't use any themes. I resolved by re-templating the PropertyGrid style. Have you plan to implement a new proprety: "IsGroupExpandedStatePersistent" for categories, like "IsExpandedStatePersistent" exists for nodes ? |
|
|
Hello IsGroupExpandedStatePersistent would certainly be useful. I will have a look at adding this in for you this week. I'll get back to you with how it goes. -Jason Fauchelle |
|
|
Hello In the next nightly build, the PropertyGrid will include the IsGroupExpandedStatePersistent property. This will maintain the state of the group expanders whenever the selected object changes. Unfortunately when a group needs to be collapsed, it will always be animated closed. This is because this is defined in the template and is difficult to control from the PropertyGrid. The solution is to create custom styles/templates that don't have this animation. You mentioned that you solved the previous issue by creating a custom template, so this may already be solved for you. Let me know if you have any questions about this. -Jason Fauchelle |
|