Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Property Grid with ComboBox

$
0
0
Hi,

1) Please do the following :
[ItemsSource( typeof( MyValuesItemsSource ) )]
    public string MyValues
    {
      get;
      set;
    }
<xctk:PropertyGrid x:Name="_propertyGrid"
                           Width="450"
                           Margin="10">
            <xctk:PropertyGrid.EditorDefinitions>
                <xctk:EditorTemplateDefinition TargetProperties="MyValues">
                    <xctk:EditorTemplateDefinition.EditingTemplate>
                        <DataTemplate>
                            <ComboBox SelectedItem="{Binding Value}"
                                               IsEditable="True" />
                        </DataTemplate>
                    </xctk:EditorTemplateDefinition.EditingTemplate>
                </xctk:EditorTemplateDefinition>
            </xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
2) Please have a look at the sample "PropertyGrid/Editors/More EditorDefinitions" from the "Live Explorer app" available here : https://wpftoolkit.codeplex.com/.

This sample uses an EditorComboBoxDefinition to display a ComboBox of colors with an ItemsSource that can be a binding.

This is available in the "Plus" version of the toolkit, v2.0.

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>