DependencyPropertyHelper

This commit is contained in:
ClemensFischer 2024-05-23 18:08:14 +02:00
parent c74c2b1fed
commit 8e82e0bcbd
25 changed files with 224 additions and 176 deletions

View file

@ -10,12 +10,12 @@ namespace MapControl
{
public partial class MapItem
{
public static readonly DependencyProperty AutoCollapseProperty = MapPanel.AutoCollapseProperty.AddOwner(
typeof(MapItem));
public static readonly DependencyProperty AutoCollapseProperty =
DependencyPropertyHelper.AddOwner<MapItem>(MapPanel.AutoCollapseProperty);
public static readonly DependencyProperty LocationProperty = MapPanel.LocationProperty.AddOwner(
typeof(MapItem), new FrameworkPropertyMetadata(null,
(o, e) => ((MapItem)o).UpdateMapTransform((Location)e.NewValue)));
public static readonly DependencyProperty LocationProperty =
DependencyPropertyHelper.AddOwner<MapItem, Location>(MapPanel.LocationProperty,
(item, oldValue, newValue) => item.UpdateMapTransform(newValue));
static MapItem()
{