Input Library Overview / Multiselect / Work with Multiselect / Styling and Appearance
Styling and Appearance

MultiSelect allows you to style the UI of the control along with the tags and other elements that helps you to change its overall appearance. For example, it lets you customize its background color, foreground color and font styles. Let us explore how to style the MultiSelect control, its tags and highlight text in the following sections.

Apply Styles to MultiSelect

The following image shows styles applied to C1MultiSelect.

Styling WPF MultiSelect

To apply style to MultiSelect using System.Windows.Style class, use the following code.

<c1:C1MultiSelect x:Name="mselect" Background="LavenderBlush" Foreground="DarkMagenta" FontFamily="Cambria" FontSize="12" FontWeight="Bold" Height="100" Width="350" ></c1:C1MultiSelect>

Back to Top

Apply Style to Tags

The following image shows background color applied to the tags in MultiSelect.

Tags Style in WPF MultiSelect

To change the background color of tags in MultiSelect, use the following code. Here, the tags styles in C1MultiSelect can be accessed via the TagStyle property. Similarly, you can change the foreground color of the tags in MultiSelect.

<Window.Resources> 
     <Style x:Key="StyleForTag" TargetType="c1:C1Tag"> 
          <Setter Property="Foreground" Value="#A52A2A" /> 
     </Style> 
</Window.Resources> 
<Grid> 
    <c1:C1MultiSelect x:Name="mselect" TagStyle="{StaticResource StyleForTag}" Height="100" Width="350" />
</Grid>

Back to Top

Apply Styles to Highlighted Text

The following image shows styles applied to the highlighted text in MultiSelect that appears when the suggested text matches the text entered in the header.

Highlight Text Style in WPF MultiSelect

To customize the color and font weight of the highlighted text in MultiSelect, use the following code.

<c1:C1MultiSelect x:Name="mselect" HighlightColor="#D37F66" HighlightFontWeight="Bold" Height="100" Width="300"></c1:C1MultiSelect>

Back to Top