提交 886bc6d8 编写于 作者: M Martin Zikmund

fix: Adjust transform on PopupPanel

上级 7ca52478
......@@ -147,8 +147,11 @@ internal partial class PopupPanel : Panel
// Gets the location of the popup (or its Anchor) in the VisualTree, so we will align Top/Left with it
// Note: we do not prevent overflow of the popup on any side as UWP does not!
// (And actually it also lets the view appear out of the window ...)
var anchor = Popup.PlacementTarget ?? Popup;
var anchorLocation = anchor.TransformToVisual(this).TransformPoint(new Point());
Point anchorLocation = default;
if (Popup.PlacementTarget is { } anchor)
{
anchorLocation = anchor.TransformToVisual(this).TransformPoint(new Point());
}
#if __ANDROID__
// for android, the above line returns the absolute coordinates of anchor on the screen
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册