mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
Version 4: Upgrade to VS 2017
This commit is contained in:
parent
2aafe32e00
commit
ec47f225b3
142 changed files with 1828 additions and 18384 deletions
46
MapControl/UWP/MapPath.UWP.cs
Normal file
46
MapControl/UWP/MapPath.UWP.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
// 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);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
return new Size();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue