2012-07-07 17:19:10 +02:00
|
|
|
|
// WPF MapControl - http://wpfmapcontrol.codeplex.com/
|
|
|
|
|
|
// Copyright © 2012 Clemens Fischer
|
|
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
2012-06-13 17:33:23 +02:00
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Displays a pushpin at the geographic location provided by the Location property.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
|
|
|
|
|
|
[TemplateVisualState(Name = "MouseOver", GroupName = "CommonStates")]
|
|
|
|
|
|
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
|
|
|
|
|
|
public class Pushpin : ContentControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public static readonly DependencyProperty LocationProperty = MapPanel.LocationProperty.AddOwner(typeof(Pushpin));
|
|
|
|
|
|
|
|
|
|
|
|
static Pushpin()
|
|
|
|
|
|
{
|
|
|
|
|
|
FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(
|
|
|
|
|
|
typeof(Pushpin), new FrameworkPropertyMetadata(typeof(Pushpin)));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Location Location
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return (Location)GetValue(LocationProperty); }
|
|
|
|
|
|
set { SetValue(LocationProperty, value); }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|