mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 15:36:20 +00:00
Added DependencyPropertyHelper.AddOwner
This commit is contained in:
parent
f78bcb33fa
commit
a3d25b5084
12 changed files with 119 additions and 133 deletions
|
|
@ -1,43 +1,15 @@
|
|||
#if UWP
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Data;
|
||||
#else
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public partial class MapContentControl : ContentControl
|
||||
public partial class MapContentControl
|
||||
{
|
||||
public static readonly DependencyProperty LocationProperty =
|
||||
DependencyPropertyHelper.Register<MapContentControl, Location>(nameof(Location), null,
|
||||
(control, oldValue, newValue) => MapPanel.SetLocation(control, newValue));
|
||||
|
||||
public static readonly DependencyProperty AutoCollapseProperty =
|
||||
DependencyPropertyHelper.Register<MapContentControl, bool>(nameof(AutoCollapse), false,
|
||||
(control, oldValue, newValue) => MapPanel.SetAutoCollapse(control, newValue));
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets MapPanel.Location.
|
||||
/// </summary>
|
||||
public Location Location
|
||||
{
|
||||
get => (Location)GetValue(LocationProperty);
|
||||
set => SetValue(LocationProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets MapPanel.AutoCollapse.
|
||||
/// </summary>
|
||||
public bool AutoCollapse
|
||||
{
|
||||
get => (bool)GetValue(AutoCollapseProperty);
|
||||
set => SetValue(AutoCollapseProperty, value);
|
||||
}
|
||||
|
||||
public MapContentControl()
|
||||
{
|
||||
DefaultStyleKey = typeof(MapContentControl);
|
||||
|
|
@ -73,10 +45,7 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapContentControl with a Pushpin Style.
|
||||
/// </summary>
|
||||
public partial class Pushpin : MapContentControl
|
||||
public partial class Pushpin
|
||||
{
|
||||
public Pushpin()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue