Fixed type casts

This commit is contained in:
ClemensF 2021-01-16 18:32:31 +01:00
parent 2208f6c3da
commit 6a9b622793
4 changed files with 9 additions and 9 deletions

View file

@ -34,7 +34,7 @@ namespace MapControl
}
/// <summary>
/// Wrapper for the MapPanel.AutoCollapse attached property.
/// Gets/sets MapPanel.AutoCollapse.
/// </summary>
public bool AutoCollapse
{
@ -43,7 +43,7 @@ namespace MapControl
}
/// <summary>
/// Wrapper for the MapPanel.Location attached property.
/// Gets/sets MapPanel.Location.
/// </summary>
public Location Location
{

View file

@ -18,7 +18,7 @@ using System.Windows.Media;
namespace MapControl
{
/// <summary>
/// Optional interface to hold the value of the MapPanel.ParentMap attached property.
/// Optional interface to hold the value of the attached property MapPanel.ParentMap.
/// </summary>
public interface IMapElement
{

View file

@ -20,11 +20,11 @@ namespace MapControl
#if WINDOWS_UWP
public static readonly DependencyProperty AutoCollapseProperty = DependencyProperty.Register(
nameof(AutoCollapse), typeof(bool), typeof(Pushpin),
new PropertyMetadata(false, (o, e) => MapPanel.SetAutoCollapse((FrameworkElement)o, (bool)e.NewValue)));
new PropertyMetadata(false, (o, e) => MapPanel.SetAutoCollapse((Pushpin)o, (bool)e.NewValue)));
public static readonly DependencyProperty LocationProperty = DependencyProperty.Register(
nameof(Location), typeof(Location), typeof(Pushpin),
new PropertyMetadata(null, (o, e) => MapPanel.SetLocation((FrameworkElement)o, (Location)e.NewValue)));
new PropertyMetadata(null, (o, e) => MapPanel.SetLocation((Pushpin)o, (Location)e.NewValue)));
#else
public static readonly DependencyProperty AutoCollapseProperty = MapPanel.AutoCollapseProperty.AddOwner(typeof(Pushpin));
@ -38,7 +38,7 @@ namespace MapControl
}
/// <summary>
/// Wrapper for the MapPanel.AutoCollapse attached property.
/// Gets/sets MapPanel.AutoCollapse.
/// </summary>
public bool AutoCollapse
{
@ -47,7 +47,7 @@ namespace MapControl
}
/// <summary>
/// Wrapper for the MapPanel.Location attached property.
/// Gets/sets MapPanel.Location.
/// </summary>
public Location Location
{

View file

@ -13,11 +13,11 @@ namespace MapControl
{
public static readonly DependencyProperty AutoCollapseProperty = DependencyProperty.Register(
nameof(AutoCollapse), typeof(bool), typeof(MapItem),
new PropertyMetadata(false, (o, e) => MapPanel.SetAutoCollapse((FrameworkElement)o, (bool)e.NewValue)));
new PropertyMetadata(false, (o, e) => MapPanel.SetAutoCollapse((MapItem)o, (bool)e.NewValue)));
public static readonly DependencyProperty LocationProperty = DependencyProperty.Register(
nameof(Location), typeof(Location), typeof(MapItem),
new PropertyMetadata(null, (o, e) => MapPanel.SetLocation((FrameworkElement)o, (Location)e.NewValue)));
new PropertyMetadata(null, (o, e) => MapPanel.SetLocation((MapItem)o, (Location)e.NewValue)));
protected override void OnPointerPressed(PointerRoutedEventArgs e)
{