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'm using: PropertyGrid.AddNode("Programs", "", PropertyGrid.ListSelectEditorKey) to add a custom PropertyEditor however how do I add the list items in code? |
|
|
This can't be done directly. The simplest workaround is to use a custom template based on the built-in template. The built-in template looks roughly like this (there's some extra stuff to handle type converters but you won't need that): <DataTemplate> You can take a copy of this and replace the ItemsSource with your own ItemsSource. Then load your custom DataTemplate using FindResource and pass that to AddNode. (Be sure to cast it to a DataTemplate so AddNode doesn't try to interpret it as a key!) |
|