Skip to content

Commit 4a30723

Browse files
authored
[DYN-8055] Placement of UI pop up for input/output ports is not accurate (#16250)
1 parent ad5a04b commit 4a30723

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,9 @@ private CustomPopupPlacement[] PlacePortContextMenu(Size popupSize, Size targetS
402402
var zoom = node.WorkspaceViewModel.Zoom;
403403
var dpiScale = GetDpiScale();
404404

405+
var source = PresentationSource.FromVisual(Application.Current.MainWindow);
406+
var dpiScale = source?.CompositionTarget?.TransformToDevice.M22 ?? 1.0;
407+
405408
double x;
406409
var scaledWidth = autocompletePopupSpacing * targetSize.Width / node.ActualWidth;
407410

0 commit comments

Comments
 (0)