mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-21 08:29:01 +08:00
20 lines
470 B
C#
20 lines
470 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Media;
|
|
|
|
namespace FancyZone_HitTest
|
|
{
|
|
public static class Utilities
|
|
{
|
|
public static Point GetPosition(Visual element, Visual root)
|
|
{
|
|
var positionTransform = element.TransformToAncestor(root);
|
|
var areaPosition = positionTransform.Transform(new Point(0, 0));
|
|
|
|
return areaPosition;
|
|
}
|
|
}
|
|
}
|