Skip to content

Optionally select combo boxes for multiple items.

cs
[TemplatePart(Name = ElementPanel, Type = typeof(Panel))]
[TemplatePart(Name = ElementSelectAll, Type = typeof(CheckComboBoxItem))]
public class CheckComboBox : ListBox, IDataInput

Attributes ​

PropertyDescriptionDefault ValueRemarks
MaxDropDownHeightThe maximum height of the drop-down content
IsDropDownOpenWhether the drop-down box is expandedfalse
TagStyleCheck mark style
ShowSelectAllButtonWhether to show all selected buttonsfalse

Additional attributes ​

PropertyDescriptionDefault ValueRemarks
InfoElement.PlaceholderPlaceholder
InfoElement.NecessaryIs it requiredfalse
InfoElement.SymbolRequired mark●
InfoElement.ContentHeightContent Height30Available when the title is above
InfoElement.MinContentHeightMinimum content height30Available when the title is on the top
TitleElement.TitleTitle
TitleElement.TitlePlacementTitle AlignmentTitlePlacementType.Top
TitleElement.TitleWidthTitleWidth120
DropDownElement.ConsistentWidthWhether the drop-down content is the same as the width of the drop-down boxfalse
IsReadOnly

Style ​

StyleDescription
CheckComboBoxBaseStyleDefault Style
CheckComboBoxExtendBaseStyleDefault extended style
CheckComboBoxPlusBaseStyleDefault Enhanced Style
CheckComboBoxExtendExtended Style
CheckComboBoxPlusEnhanced Style
Tag4CheckComboBoxStyle.Small
CheckComboBox.Small
CheckComboBoxExtend.Small
CheckComboBoxPlus.Small
CheckComboBoxItem.Small

Case ​

xml
<hc:CheckComboBox>
    <hc:CheckComboBoxItem Content="Item 1"/>
    <hc:CheckComboBoxItem Content="Item 2"/>
    <hc:CheckComboBoxItem Content="Item 3"/>
</hc:CheckComboBox>

Or

xml
<StackPanel Margin="32" Orientation="Horizontal">
    <StackPanel>
        <hc:CheckComboBox ShowClearButton="True" MaxWidth="380" ItemsSource="{Binding DataList}" ShowSelectAllButton="True"/>
        <hc:CheckComboBox MaxWidth="380" ItemsSource="{Binding DataList}" Style="{StaticResource CheckComboBoxExtend}" Margin="0,16,0,0"  IsEnabled="False" ShowSelectAllButton="True"/>
        <hc:CheckComboBox ShowClearButton="True" MaxWidth="380" ItemsSource="{Binding DataList}" Style="{StaticResource CheckComboBoxExtend}" hc:InfoElement.Title="TitleDemoStr1" Margin="0,32,0,0" ShowSelectAllButton="True"/>
        <hc:CheckComboBox MaxWidth="380" ItemsSource="{Binding DataList}" hc:InfoElement.Placeholder="PlsEnterContent" hc:InfoElement.Title="TitleDemoStr2" Style="{StaticResource CheckComboBoxExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
        <hc:CheckComboBox ShowClearButton="True" Width="380" ItemsSource="{Binding DataList}" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" Style="{StaticResource CheckComboBoxExtend}" hc:InfoElement.Title="TitleDemoStr3" Margin="0,32,0,0" ShowSelectAllButton="True"/>
        <hc:CheckComboBox Width="380" ItemsSource="{Binding DataList}" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="PlsEnterContent" hc:InfoElement.Title="TitleDemoStr3" Style="{StaticResource CheckComboBoxExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
    </StackPanel>
    <StackPanel Margin="32,0,0,0">
        <hc:CheckComboBox ShowClearButton="True" MaxWidth="380" ItemsSource="{Binding DataList}" Style="{StaticResource CheckComboBoxPlus}" ShowSelectAllButton="True"/>
        <hc:CheckComboBox MaxWidth="380" ItemsSource="{Binding DataList}" Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource CheckComboBoxPlus}"/>
        <hc:CheckComboBox MaxWidth="380" ShowClearButton="True" ItemsSource="{Binding DataList}" Style="{StaticResource CheckComboBoxPlus}" hc:InfoElement.Title="TitleDemoStr1" Margin="0,32,0,0" ShowSelectAllButton="True"/>
        <hc:CheckComboBox MaxWidth="380" ItemsSource="{Binding DataList}" hc:InfoElement.Placeholder="PlsEnterContent" hc:InfoElement.Title="TitleDemoStr2" Style="{StaticResource CheckComboBoxPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
        <hc:CheckComboBox MaxWidth="380" ItemsSource="{Binding DataList}" ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" Style="{StaticResource CheckComboBoxPlus}" hc:InfoElement.Title="TitleDemoStr3" Margin="0,32,0,0" ShowSelectAllButton="True"/>
        <hc:CheckComboBox MaxWidth="380" ItemsSource="{Binding DataList}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="PlsEnterContent" hc:InfoElement.Title="TitleDemoStr3" Style="{StaticResource CheckComboBoxPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
    </StackPanel>
</StackPanel>

CheckComboBox

Released under the MIT License.