MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit copied to clipboard
I need to control combobox popup height.
In my case,
i want to shrink the datagrid combobox like this.
how i can do like this??
@taehyun1234 I believe you can achieve what you want by adding the following to your combo box column:
<materialDesign:DataGridComboBoxColumn ...>
<materialDesign:DataGridComboBoxColumn.EditingElementStyle>
<Style TargetType="ComboBox" BasedOn="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type ComboBox}, ResourceId=MaterialDataGridComboBoxColumnEditingStyle}}" >
<Style.Resources>
<Style x:Key="MyComboBoxItemStyle" TargetType="ComboBoxItem" BasedOn="{StaticResource MaterialDesignComboBoxItemStyle}">
<Setter Property="Padding" Value="0" /> <!-- Set whichever padding you prefer here -->
</Style>
</Style.Resources>
<Setter Property="ItemContainerStyle" Value="{StaticResource MyComboBoxItemStyle}" />
</Style>
</materialDesign:DataGridComboBoxColumn.EditingElementStyle>
</materialDesign:DataGridComboBoxColumn>
Closed due to no feedback of OP after answer.