XAML-Map-Control/MapControl/UWP/MapPath.UWP.cs

47 lines
1.1 KiB
C#
Raw Normal View History

// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
// © 2017 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
using Windows.Foundation;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Shapes;
namespace MapControl
{
public partial class MapPath : Path
{
private Geometry data;
public MapPath()
{
MapPanel.AddParentMapHandlers(this);
}
2017-08-04 21:38:58 +02:00
protected override Size MeasureOverride(Size availableSize)
{
if (Stretch != Stretch.None)
{
Stretch = Stretch.None;
}
// Workaround for missing PropertyChangedCallback for the Data property.
if (data != Data)
{
if (data != null)
{
data.ClearValue(Geometry.TransformProperty);
}
data = Data;
if (data != null)
{
data.Transform = viewportTransform;
}
}
2017-08-04 21:38:58 +02:00
return new Size();
}
}
}