mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
* Fix FancyZones Hit test build * Fix DrawLayoutTest * Fix Zonable tester * Adress PR comments
21 lines
587 B
C#
21 lines
587 B
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|