未验证 提交 75c34ba9 编写于 作者: P punker76

fix: #449 translate drop target highlight position to visual target bounds

上级 5475ffbd
......@@ -39,7 +39,9 @@ protected override void OnRender(DrawingContext drawingContext)
if (rect.IsEmpty)
{
rect = new Rect(visualTargetItem.TranslatePoint(new Point(), this.AdornedElement), VisualTreeExtensions.GetVisibleDescendantBounds(visualTargetItem).Size);
var bounds = VisualTreeExtensions.GetVisibleDescendantBounds(visualTargetItem);
var location = visualTargetItem.TranslatePoint(bounds.Location, this.AdornedElement);
rect = new Rect(location, bounds.Size);
}
drawingContext.DrawRoundedRectangle(null, this.Pen, rect, 2, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册