I'm really happy that the new comboboxcolumn was added to the latest release, but I can't seem to style it correctly. We're using a theme to apply styles to our different controls but I'm not sure how to get the style set for our ComboBoxColumn. Does anyone know of any examples out there where the combobox for a comboboxcolumn is getting styled in a theme?
Hi,
what do you mean by
bhoaglund said:a comboboxcolumn is getting styled in a theme
You can style the ComboBoxes in ComboBoxColumn by provideing a style to EditorStyle property of the column.
You could use a style like this:
<Style x:Key="cbStyle1" TargetType="ComboBox"> <Setter Property="Background"> <Setter.Value> <SolidColorBrush Color="Green" /> </Setter.Value> </Setter> </Style>
HTH,
This is pretty similar to what I was attempting. I already have a style set up for comboboxes (TargetType="ComboBox") and it's x:Key is "ComboStyle". The problem is, when I attempt to style the ComboBoxColumn I get and error stating that "The property 'EditorStyle' was not found in type 'Infragistics.Controls.Grids.ComboBoxColumn'". My style in the themes looks like this:
<Style TargetType="ig:ComboBoxColumn" x:Key="ComboColumnStyle1"> <Setter Property="EditorStyle" Value="{StaticResource ComboStyle}" /> <Setter Property="CellStyle" Value="{StaticResource ComboStyle}" /></Style>
Sorry for the delay, I've been out on vacation. I haven't had a chance to try this, but what you're saying makes sense. Thanks for your help.
Hello,
Were you able to resolve your issue?
Valerie
You can only style Controls in SL. ComboBoxColumn isn't a control, its just a DependencyObject as it doesn't actually have any visual aspect to it.
You'd have to set the EditorStyle property explicitly when you add the column to the xamGrid.
-SteveZ