mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Added DependencyPropertyHelper.AddOwner
This commit is contained in:
parent
f78bcb33fa
commit
a3d25b5084
12 changed files with 119 additions and 133 deletions
|
|
@ -104,10 +104,25 @@ namespace MapControl
|
|||
|
||||
public static DependencyProperty AddOwner<TOwner, TValue>(
|
||||
DependencyProperty source,
|
||||
Action<TOwner, TValue, TValue> changed = null) where TOwner : DependencyObject
|
||||
Action<TOwner, TValue, TValue> changed) where TOwner : DependencyObject
|
||||
{
|
||||
return source.AddOwner(typeof(TOwner), new FrameworkPropertyMetadata(
|
||||
(o, e) => changed((TOwner)o, (TValue)e.OldValue, (TValue)e.NewValue)));
|
||||
}
|
||||
|
||||
public static DependencyProperty AddOwner<TOwner, TValue>(
|
||||
string _, // for compatibility with WinUI/UWP DependencyPropertyHelper
|
||||
DependencyProperty source) where TOwner : DependencyObject
|
||||
{
|
||||
return AddOwner<TOwner, TValue>(source);
|
||||
}
|
||||
|
||||
public static DependencyProperty AddOwner<TOwner, TValue>(
|
||||
string _, // for compatibility with WinUI/UWP DependencyPropertyHelper
|
||||
DependencyProperty source,
|
||||
Action<TOwner, TValue, TValue> changed) where TOwner : DependencyObject
|
||||
{
|
||||
return AddOwner(source, changed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue