mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +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
|
|
@ -18,6 +18,10 @@ namespace MapControl
|
|||
{
|
||||
public partial class MapBase
|
||||
{
|
||||
public static readonly DependencyProperty ForegroundProperty =
|
||||
DependencyPropertyHelper.Register<MapBase, Brush>(nameof(Foreground),
|
||||
new SolidColorBrush(Colors.Black));
|
||||
|
||||
public static readonly DependencyProperty AnimationEasingFunctionProperty =
|
||||
DependencyPropertyHelper.Register<MapBase, EasingFunctionBase>(nameof(AnimationEasingFunction),
|
||||
new QuadraticEase { EasingMode = EasingMode.EaseOut });
|
||||
|
|
@ -58,7 +62,8 @@ namespace MapControl
|
|||
DependencyPropertyHelper.Register<MapBase, double>(nameof(ViewScale), 0d);
|
||||
|
||||
private static readonly DependencyProperty AnimatedCenterProperty =
|
||||
DependencyPropertyHelper.Register<MapBase, Windows.Foundation.Point>(nameof(AnimatedCenter), new Windows.Foundation.Point(),
|
||||
DependencyPropertyHelper.Register<MapBase, Windows.Foundation.Point>(nameof(AnimatedCenter),
|
||||
new Windows.Foundation.Point(),
|
||||
(map, oldValue, newValue) => map.Center = new Location(newValue.Y, newValue.X));
|
||||
|
||||
private Windows.Foundation.Point AnimatedCenter => (Windows.Foundation.Point)GetValue(AnimatedCenterProperty);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue