mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
31 lines
1,006 B
C#
31 lines
1,006 B
C#
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
|
// Copyright © 2012 Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
using System.Collections.Generic;
|
|
using System.Windows;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace MapControl
|
|
{
|
|
public partial class MapPolyline : Path
|
|
{
|
|
public static readonly DependencyProperty LocationsProperty = DependencyProperty.Register(
|
|
"Locations", typeof(ICollection<Location>), typeof(MapPolyline),
|
|
new PropertyMetadata(null, LocationsPropertyChanged));
|
|
|
|
public MapPolyline()
|
|
{
|
|
Data = Geometry;
|
|
MapPanel.AddParentMapHandlers(this);
|
|
}
|
|
|
|
protected override Size MeasureOverride(Size constraint)
|
|
{
|
|
// MeasureOverride in Silverlight occasionally tries to create
|
|
// negative width or height from a transformed geometry in Data.
|
|
return new Size(Geometry.Bounds.Width, Geometry.Bounds.Height);
|
|
}
|
|
}
|
|
}
|