Skip to content

Commit 12f753b

Browse files
committed
Fix ComboBox popup placement
1 parent 348a87f commit 12f753b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MaterialDesignThemes.Wpf/ComboBoxPopup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private CustomPopupPlacement[] ComboBoxCustomPopupPlacementCallback(Size popupSi
108108
int locationX = (int) locationFromScreen.X%(int) SystemParameters.PrimaryScreenWidth;
109109
int locationY = (int) locationFromScreen.Y%(int) SystemParameters.PrimaryScreenHeight;
110110

111-
if (locationX + popupSize.Width > SystemParameters.PrimaryScreenWidth)
111+
if (locationX + popupSize.Width > SystemParameters.PrimaryScreenWidth || locationX < 0)
112112
{
113113
SetChildTemplateIfNeed(DefaultContentTemplate);
114114

0 commit comments

Comments
 (0)