XAML-Map-Control/MapControl/WPF/Pushpin.cs

43 lines
1.3 KiB
C#
Raw Normal View History

// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
2021-01-13 21:19:27 +01:00
// © 2021 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
using System.Windows;
2017-09-05 20:57:17 +02:00
using System.Windows.Controls;
namespace MapControl
{
/// <summary>
/// Pushpin at a geographic location specified by the Location property.
/// </summary>
public class Pushpin : ContentControl
{
2021-01-13 00:08:55 +01:00
public static readonly DependencyProperty AutoCollapseProperty = MapPanel.AutoCollapseProperty.AddOwner(typeof(Pushpin));
public static readonly DependencyProperty LocationProperty = MapPanel.LocationProperty.AddOwner(typeof(Pushpin));
2021-01-17 00:31:30 +01:00
static Pushpin()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(Pushpin), new FrameworkPropertyMetadata(typeof(Pushpin)));
}
2021-01-13 00:08:55 +01:00
/// <summary>
2021-01-16 18:32:31 +01:00
/// Gets/sets MapPanel.AutoCollapse.
2021-01-13 00:08:55 +01:00
/// </summary>
public bool AutoCollapse
{
get { return (bool)GetValue(AutoCollapseProperty); }
set { SetValue(AutoCollapseProperty, value); }
}
/// <summary>
2021-01-16 18:32:31 +01:00
/// Gets/sets MapPanel.Location.
2021-01-13 00:08:55 +01:00
/// </summary>
public Location Location
{
get { return (Location)GetValue(LocationProperty); }
set { SetValue(LocationProperty, value); }
}
}
}