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

@ -23,9 +23,9 @@ namespace MapControl
/// </summary>
public partial class MapPath : IMapElement
{
public static readonly DependencyProperty LocationProperty = DependencyProperty.Register(
nameof(Location), typeof(Location), typeof(MapPath),
new PropertyMetadata(null, (o, e) => ((MapPath)o).UpdateData()));
public static readonly DependencyProperty LocationProperty =
DependencyPropertyHelper.Register<MapPath, Location>(nameof(Location), null, false,
(path, oldValue, newValue) => path.UpdateData());
private MapBase parentMap;