fix: fix MaxDropDownHeight typo in MultiComboBox.

This commit is contained in:
Zhang Dian
2025-01-14 00:30:11 +08:00
parent e9169d65d1
commit 9bbcb1bd33
2 changed files with 7 additions and 7 deletions

View File

@@ -10,7 +10,7 @@
<Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="MaxDropdownHeight" Value="300" />
<Setter Property="MaxDropDownHeight" Value="300" />
<Setter Property="MaxSelectionBoxHeight" Value="270" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="Padding" Value="12 4" />
@@ -103,7 +103,7 @@
</Border>
<Popup
MinWidth="{Binding #PART_RootGrid.Bounds.Width}"
MaxHeight="{TemplateBinding MaxDropdownHeight}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
IsLightDismissEnabled="True"
IsOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDropDownOpen, Mode=TwoWay}"
PlacementTarget="PART_RootGrid">

View File

@@ -30,9 +30,9 @@ public class MultiComboBox : SelectingItemsControl, IInnerContentControl, IPopup
public static readonly StyledProperty<bool> IsDropDownOpenProperty =
ComboBox.IsDropDownOpenProperty.AddOwner<MultiComboBox>();
public static readonly StyledProperty<double> MaxDropdownHeightProperty =
public static readonly StyledProperty<double> MaxDropDownHeightProperty =
AvaloniaProperty.Register<MultiComboBox, double>(
nameof(MaxDropdownHeight));
nameof(MaxDropDownHeight));
public static readonly StyledProperty<double> MaxSelectionBoxHeightProperty =
AvaloniaProperty.Register<MultiComboBox, double>(
@@ -89,10 +89,10 @@ public class MultiComboBox : SelectingItemsControl, IInnerContentControl, IPopup
set => SetValue(IsDropDownOpenProperty, value);
}
public double MaxDropdownHeight
public double MaxDropDownHeight
{
get => GetValue(MaxDropdownHeightProperty);
set => SetValue(MaxDropdownHeightProperty, value);
get => GetValue(MaxDropDownHeightProperty);
set => SetValue(MaxDropDownHeightProperty, value);
}
public double MaxSelectionBoxHeight