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 have a Dimension object, where one property is a Connection object. By default, the property grid grays out the Connection object since it doesn't know how to process it. Thus, I wanted to create a custom editor so the Connection node would display a dropdown of connections (from a list) and the user could select one. The connectionList is an observable collection. My data template for the choser is: <DataTemplate x:Key="ConnectionChoser"> <ComboBox ItemsSource="{Binding Source={StaticResource connectionList}}" SelectedItem="{Binding Value}" /> </DataTemplate>In the list of property grid editors, I have: <ms:PropertyGrid.Editors> <ms:PropertyEditor PropertyName="Connection" EditorTemplate="{StaticResource ConnectionChoser}" /> </ms:PropertyGrid.Editors>The selectedObject for the property grid is a dimension object, which inherits the Connection property from its base class. My expectation is that for the Connection property, the property grid will display the dropdown and select a ConnectionNode object, which will cause that object to be set in the dimension's Connection property. Is there something else I need to do so the property grid will display the editor (rather than display the gray box) ? Thanks, -Craig P.S. - I'm currently using the v1 property grid |
|
|
That looks like it should work. Can you send me a small project that reproduces the problem please, so I can look into it? You can attach zip files via the Options tab. |
|
|
I got it to work in a simple example so I'm reviewing my code for issues since it seems to be a bug on my end. Thanks, -Craig |
|