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
|
Hi All, I have declared a custom editor as follows: <ms:PropertyGrid Name="propGrid"><ms:PropertyGrid.Resources> <DataTemplate x:Key="LookupEditorTemplate"> <ComboBox ItemsSource="{Binding EditContext.Items}" DisplayMemberPath="{Binding EditContext.DisplayMemberPath}" SelectedValuePath="{Binding EditContext.SelectedValuePath}" SelectedValue="{Binding Value.Value, Converter={StaticResource NullableInt32Converter}}"> </ComboBox> </DataTemplate> </ms:PropertyGrid.Resources> <ms:PropertyGrid.Editors> <Editors:LookupEditor EditorTemplate="{StaticResource LookupEditorTemplate}" AllowExpand="False" /> </ms:PropertyGrid.Editors> </ms:PropertyGrid> This allows me to select an instance of a list and associate it with the property of my object. All works well except that the end-user is able to expand the property, because the instance is a class itself with (sub)properties. How can I prevent the expand. I have tried AllowExpand is false (as can be seen in the XAML snippet). Thanks in advance for any help, Jan van de Pol |
|
|
Hi Jan, Setting AllowExpand to false certainly should work (in fact this is the default so you shouldn't even need to do this explicitly). Could you send us a sample project which demonstrates the problem please, so we can investigate? You can attach a zip file via the Options tab. Thanks! |
|