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
Is there an easy way to expand ALL nodes by code on the WPF propertyGrid component ? I did not find any property/method to do so (not even an "ExpandAll()" something which seems to be IMHO a must have for hierachical controls) and finally almost got what I wanted by using the visual tree helper like that :
And the data used to test it :
It work fine, except that for a reason I can't explain, this method does not find "TreeListViewItem" which represent collection elements. Thus, all nodes (here the "SmallFoo" items) are not expanded.
Does anyone as a solution for this ?
Thx in advance
|
|
|
There's no built-in way, but you can do it using the code from this thread: http://www.mindscapehq.com/forums/Thread.aspx?ThreadID=2567 To expand all nodes, pass a Predicate that always returns true (or just edit the predicate out of the code). |
|
|
For anyone reading this thread, the latest nightly build of WPF Elements 6.0 includes an ExpanderMode property on the PropertyGrid which when set to Expanded will expand all items on startup. Jason Fauchelle |
|