mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
32 lines
672 B
C#
32 lines
672 B
C#
#if UWP
|
|
using Windows.UI.Xaml.Media;
|
|
using Windows.UI.Xaml.Shapes;
|
|
#else
|
|
using Microsoft.UI.Xaml.Media;
|
|
using Microsoft.UI.Xaml.Shapes;
|
|
#endif
|
|
|
|
namespace MapControl
|
|
{
|
|
public partial class MapPath : Path
|
|
{
|
|
public MapPath()
|
|
{
|
|
Stretch = Stretch.None;
|
|
MapPanel.InitMapElement(this);
|
|
}
|
|
|
|
private void SetMapTransform(Matrix matrix)
|
|
{
|
|
if (Data.Transform is MatrixTransform transform)
|
|
{
|
|
transform.Matrix = matrix;
|
|
}
|
|
else
|
|
{
|
|
Data.Transform = new MatrixTransform { Matrix = matrix };
|
|
}
|
|
}
|
|
}
|
|
}
|