mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Workaround for Locations property type in MapPolyline.
This commit is contained in:
parent
452e039349
commit
8e85aa8e17
|
|
@ -2,6 +2,7 @@
|
|||
// Copyright © 2012 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
|
|
@ -9,6 +10,10 @@ 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;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// Copyright © 2012 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
|
|
@ -10,6 +11,10 @@ namespace MapControl
|
|||
{
|
||||
public partial class MapPolyline : Shape
|
||||
{
|
||||
public static readonly DependencyProperty LocationsProperty = DependencyProperty.Register(
|
||||
"Locations", typeof(ICollection<Location>), typeof(MapPolyline),
|
||||
new PropertyMetadata(null, LocationsPropertyChanged));
|
||||
|
||||
protected override Geometry DefiningGeometry
|
||||
{
|
||||
get { return Geometry; }
|
||||
|
|
|
|||
|
|
@ -2,12 +2,21 @@
|
|||
// Copyright © 2012 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Shapes;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public partial class MapPolyline : Path
|
||||
{
|
||||
/// <summary>
|
||||
/// Property type declared as object instead of IEnumerable.
|
||||
/// See here: http://stackoverflow.com/q/10544084/1136211
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty LocationsProperty = DependencyProperty.Register(
|
||||
"Locations", typeof(object), typeof(MapPolyline),
|
||||
new PropertyMetadata(null, LocationsPropertyChanged));
|
||||
|
||||
public MapPolyline()
|
||||
{
|
||||
Data = Geometry;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// Copyright © 2012 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
|
|
@ -17,10 +18,6 @@ namespace MapControl
|
|||
{
|
||||
public partial class MapPolyline : IMapElement
|
||||
{
|
||||
public static readonly DependencyProperty LocationsProperty = DependencyProperty.Register(
|
||||
"Locations", typeof(IEnumerable<Location>), typeof(MapPolyline),
|
||||
new PropertyMetadata(null, LocationsPropertyChanged));
|
||||
|
||||
public static readonly DependencyProperty IsClosedProperty = DependencyProperty.Register(
|
||||
"IsClosed", typeof(bool), typeof(MapPolyline),
|
||||
new PropertyMetadata(false, (o, e) => ((MapPolyline)o).UpdateGeometry()));
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE</DefineConstants>
|
||||
|
|
|
|||
Loading…
Reference in a new issue