using System.Windows;
using System.Windows.Controls;
namespace MapControl
{
///
/// ContentControl placed on a MapPanel at a geographic location specified by the Location property.
///
public class MapContentControl : ContentControl
{
public static readonly DependencyProperty AutoCollapseProperty =
MapPanel.AutoCollapseProperty.AddOwner(typeof(MapContentControl));
public static readonly DependencyProperty LocationProperty =
MapPanel.LocationProperty.AddOwner(typeof(MapContentControl));
static MapContentControl()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(MapContentControl), new FrameworkPropertyMetadata(typeof(MapContentControl)));
}
///
/// Gets/sets MapPanel.AutoCollapse.
///
public bool AutoCollapse
{
get => (bool)GetValue(AutoCollapseProperty);
set => SetValue(AutoCollapseProperty, value);
}
///
/// Gets/sets MapPanel.Location.
///
public Location Location
{
get => (Location)GetValue(LocationProperty);
set => SetValue(LocationProperty, value);
}
}
///
/// MapContentControl with a Pushpin Style.
///
public class Pushpin : MapContentControl
{
static Pushpin()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(Pushpin), new FrameworkPropertyMetadata(typeof(Pushpin)));
}
public static readonly DependencyProperty CornerRadiusProperty =
DependencyPropertyHelper.Register(nameof(CornerRadius));
public CornerRadius CornerRadius
{
get => (CornerRadius)GetValue(CornerRadiusProperty);
set => SetValue(CornerRadiusProperty, value);
}
}
}