Intersoft ClientUI Documentation
How-to: Customize Dropdown Appearance in UXComboBox

This example shows how to customize dropdown appearance in UXComboBox.

Example

Description

Style could be considered as a convenient way to apply a set of property values to more than one element. For example, if you want your UXComboBox elements to share some dropdown properties, you can create a Style in the Resources section of your XAML file as demonstrated in the code below.

For more information about Style, see Styles and Templates Overview.

Code

XAML
Copy Code
<Intersoft:UXPage.Resources>
    <Style TargetType="Intersoft:UXComboBox">
        <Setter Property="DropDownHeight" Value="100" />
        <Setter Property="DropDownBorderBrush" Value="Blue" />
    </Style>
</Intersoft:UXPage.Resources>
<StackPanel x:Name="LayoutRoot">
    <Intersoft:UXComboBox Name="uXComboBox1" Width="150">
        <Intersoft:UXComboBoxItem Content="Andrew"/>
        <Intersoft:UXComboBoxItem Content="Angela"/>
        <Intersoft:UXComboBoxItem Content="Angeline"/>
        <Intersoft:UXComboBoxItem Content="David"/>
        <Intersoft:UXComboBoxItem Content="Hill"/>
        <Intersoft:UXComboBoxItem Content="Karen"/>
        <Intersoft:UXComboBoxItem Content="Kory"/>
        <Intersoft:UXComboBoxItem Content="Michelle"/>
    </Intersoft:UXComboBox>
    <Intersoft:UXComboBox Name="uXComboBox2" Width="150">
        <Intersoft:UXComboBoxItem Content="Visa"/>
        <Intersoft:UXComboBoxItem Content="MasterCard"/>
        <Intersoft:UXComboBoxItem Content="American Express"/>
    </Intersoft:UXComboBox>
</StackPanel>
See Also

Concepts

Other Resources