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 {