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
|
I am trying to change the way a Node is displayed in an editor for a custom type. One of the properties in my type is a Collection, which results in a TreeListView. Each node presented by a TreeListViewItem has the editor and a little delete button. At first, the default editor would display the fully qualified type name of my data type, so I added a custom editor that inherits from ObjectWrappingEditor. The editor's CanEdit method supplies a result based on the property type of the incoming Node. Then I apply a DataTemplate that has only empty content. That got rid of half my problem. The remaining problem is that the buttons to delete (and add) items from (to) the collection are still present. I need to hide those buttons, but I can't figure out how to do it since the Node only supplies Property getters. Essentially, I want to make the whole TreeListView so that its items are read only. Also, it would be nice if the items were expanded by default. Thanks in advance for any help! If you can see the attached image, the red outline shows one of the empty data templates.
|
|
|
To disable the Add and Delete buttons, set PropertyGrid.AllowModifyCollections="False" in your XAML. To programmatically expand nodes, see http://www.mindscapehq.com/forums/Thread.aspx?PostID=11309. |
|