Hi,
I have created a custom property editor that implements a grouped combobox based on a custom object type in our project. This works fine but the styling of the combo does not match the styling of the built-in combo that is used if, for example, a list of strings is displayed in the grid.
Can you direct me to the style to apply to the combo in the custom editor so that it visually matches your built-in editor?
Thanks
Andrew
P.S. I have put this in as a bug by mistake but can't see how to switch to a question. Sorry!
<DataTemplate x:Key="TagSelectionEditor_DataTemplate">
<Grid>
<Grid.Resources>
<CollectionViewSource Source="{Binding StandardValues, RelativeSource={RelativeSource AncestorType={x:Type propertygrid:IPropertyDataAccessor}}}" x:Key="Tags">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="ParentName" />
</CollectionViewSource.GroupDescriptions>
</CollectionViewSource>
</Grid.Resources>
<ribbon:ComboBox
ItemsSource="{Binding Source={StaticResource Tags}}"
SelectedValue="{Binding Path=Value, RelativeSource={RelativeSource AncestorType={x:Type propertygrid:IPropertyDataAccessor}}}">
<ComboBox.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" FontStyle="Italic" Margin="3" />
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ComboBox.GroupStyle>
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name}" VerticalAlignment="Center"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ribbon:ComboBox>
</Grid>
</DataTemplate>
[Modified 13 years ago]