From c74c2b1fedc834a6112aa116b3e132957c17d24b Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Wed, 22 May 2024 22:08:07 +0200 Subject: [PATCH] Avalonia MapBorderPanel --- MapControl/Avalonia/MapControl.Avalonia.csproj | 1 - MapControl/Shared/MapBorderPanel.cs | 11 +++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/MapControl/Avalonia/MapControl.Avalonia.csproj b/MapControl/Avalonia/MapControl.Avalonia.csproj index 9452e012..8021a1e9 100644 --- a/MapControl/Avalonia/MapControl.Avalonia.csproj +++ b/MapControl/Avalonia/MapControl.Avalonia.csproj @@ -24,7 +24,6 @@ - diff --git a/MapControl/Shared/MapBorderPanel.cs b/MapControl/Shared/MapBorderPanel.cs index 932cbf17..5c2ed112 100644 --- a/MapControl/Shared/MapBorderPanel.cs +++ b/MapControl/Shared/MapBorderPanel.cs @@ -8,6 +8,9 @@ using System.Windows; using Windows.UI.Xaml; #elif WINUI using Microsoft.UI.Xaml; +#elif AVALONIA +using DependencyProperty = Avalonia.AvaloniaProperty; +using FrameworkElement = Avalonia.Controls.Control; #endif namespace MapControl @@ -20,11 +23,11 @@ namespace MapControl /// public class MapBorderPanel : MapPanel { - public static readonly DependencyProperty BorderWidthProperty = DependencyProperty.Register( - nameof(BorderWidth), typeof(double), typeof(MapBorderPanel), null); + public static readonly DependencyProperty BorderWidthProperty = + DependencyPropertyHelper.Register(nameof(BorderWidth)); - public static readonly DependencyProperty OnBorderProperty = DependencyProperty.RegisterAttached( - "OnBorder", typeof(bool), typeof(MapBorderPanel), null); + public static readonly DependencyProperty OnBorderProperty = + DependencyPropertyHelper.RegisterAttached("OnBorder"); public double BorderWidth {