40
XamComboEditor Styling
posted

Hello there,

I am facing some troubles trying to style the XamComboEditor. I may be approaching this the wrong way but after looking at the documentary and some help threads I still can't figure out how to style the XamComboEditor the way I want it or rather what properties to access.

As an example have a picture of what I currently achieved when I tried to style the control:

Example

To the left and right side of the XamComboEditor I have some CheckBoxes in the style I have them all over my app. Also you can see the 2 different shades of grey color I use for backgrounds. What I am trying to achieve is also having the parts which are still white/windows default color in my "color sheme".

This is the code I currently use for the XamComboEditor:

<igE:XamComboEditor Name="SelectedPCBox" IsEditable="False" AllowMultipleSelection="True"
ItemsSource="{Binding PerformanceComparisons}" DisplayMemberPath="Key"
CheckBoxVisibility="Visible" Width="150" VerticalAlignment="Center"
Margin="10 0">
<igE:XamComboEditor.ItemContainerStyle>
<Style TargetType="igE:ComboEditorItemControl">
<Setter Property="Background" Value="#2a2a2a"/>
<Setter Property="Foreground" Value="WhiteSmoke"/>
</Style>
</igE:XamComboEditor.ItemContainerStyle>
<igE:XamComboEditor.Style>
<Style TargetType="igE:XamComboEditor">
<Setter Property="Background" Value="#2a2a2a"/>
<Setter Property="EditAreaBackground" Value="#2a2a2a"/>
<Setter Property="Foreground" Value="WhiteSmoke"/>
</Style>
</igE:XamComboEditor.Style>



Now I do have a ResourceDictionary which contains styles for ComboBoxes, CheckBoxes and ScrollBars. It would be cool if there was a way to just apply those to the XamComboEditor to keep the appearance the same in the whole app but I would also be content with just having the colors align to my app and using the default XamComboEditor style.

Best regards

Henrik