Skip to content

Commit 9b53261

Browse files
authored
Fixing popup box placement when DPI is greater than 100% (#1700)
Fixes #1590
1 parent 2d9767b commit 9b53261

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MaterialDesignThemes.Wpf/ComboBoxPopup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ private PositioningData GetPositioningData(IEnumerable<DependencyObject> visualA
241241
if (mainVisual == null) throw new ArgumentException($"{nameof(visualAncestry)} must contains unless one {nameof(Visual)} control inside.");
242242

243243
var screen = Screen.FromPoint(locationFromScreen);
244-
var screenWidth = (int)DpiHelper.TransformToDeviceX(mainVisual, (int)screen.Bounds.Width);
245-
var screenHeight = (int)DpiHelper.TransformToDeviceY(mainVisual, (int)screen.Bounds.Height);
244+
var screenWidth = (int)screen.Bounds.Width;
245+
var screenHeight = (int)screen.Bounds.Height;
246246

247247
//Adjust the location to be in terms of the current screen
248248
var locationX = (int)(locationFromScreen.X - screen.Bounds.X) % screenWidth;

0 commit comments

Comments
 (0)