Skip to content

Commit

Permalink
Fix issue with dropdown height measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Sep 1, 2024
1 parent f2bd5cd commit 8a15073
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public override SizeF GetPreferredSize(Control control, SizeF availableSpace)
var preferredSize = SizeF.Max(
base.GetPreferredSize(control, availableSpace),
native.PreferredSize.ToEto());
if (control.GetType() == typeof(DropDown))
if (control.GetType() == typeof(DropDown) && control.Height > 0)
{
// Work around a WinForms bug where the preferred height of a DropDown is incorrect
preferredSize.Height = control.Height;
Expand Down

0 comments on commit 8a15073

Please sign in to comment.