#if WPF using System.Windows; using System.Windows.Controls; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; #elif WINUI using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; #elif AVALONIA using Avalonia.Controls; #endif namespace MapControl { /// /// ContentControl placed on a MapPanel at a geographic location specified by the Location property. /// public partial class MapContentControl : ContentControl { public static readonly DependencyProperty LocationProperty = DependencyPropertyHelper.Register(nameof(Location), default, (control, oldValue, newValue) => MapPanel.SetLocation(control, newValue)); public static readonly DependencyProperty AutoCollapseProperty = DependencyPropertyHelper.Register(nameof(AutoCollapse), false, (control, oldValue, newValue) => MapPanel.SetAutoCollapse(control, newValue)); /// /// Gets/sets MapPanel.Location. /// public Location Location { get => (Location)GetValue(LocationProperty); set => SetValue(LocationProperty, value); } /// /// Gets/sets MapPanel.AutoCollapse. /// public bool AutoCollapse { get => (bool)GetValue(AutoCollapseProperty); set => SetValue(AutoCollapseProperty, value); } } /// /// MapContentControl with a Pushpin Style. /// public partial class Pushpin : MapContentControl { } }