mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Use AddOwner for MapBase.Foreground
This commit is contained in:
parent
3c907c3345
commit
197f004eeb
10 changed files with 45 additions and 60 deletions
|
|
@ -73,24 +73,9 @@ namespace MapControl
|
|||
return DependencyProperty.RegisterReadOnly(name, typeof(TValue), typeof(TOwner), new PropertyMetadata(defaultValue));
|
||||
}
|
||||
|
||||
public static DependencyProperty AddOwner<TOwner>(
|
||||
DependencyProperty property,
|
||||
FrameworkPropertyMetadataOptions options = FrameworkPropertyMetadataOptions.None)
|
||||
where TOwner : DependencyObject
|
||||
{
|
||||
FrameworkPropertyMetadata metadata = null;
|
||||
|
||||
if (options != FrameworkPropertyMetadataOptions.None)
|
||||
{
|
||||
metadata = new FrameworkPropertyMetadata(property.DefaultMetadata.DefaultValue, options);
|
||||
}
|
||||
|
||||
return property.AddOwner(typeof(TOwner), metadata);
|
||||
}
|
||||
|
||||
public static DependencyProperty AddOwner<TOwner, TValue>(
|
||||
DependencyProperty property,
|
||||
Action<TOwner, TValue, TValue> changed)
|
||||
Action<TOwner, TValue, TValue> changed = null)
|
||||
where TOwner : DependencyObject
|
||||
{
|
||||
FrameworkPropertyMetadata metadata = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue