Avalonia MapBorderPanel

This commit is contained in:
ClemensFischer 2024-05-22 22:08:07 +02:00
parent f6e27f231d
commit c74c2b1fed
2 changed files with 7 additions and 5 deletions

View file

@ -24,7 +24,6 @@
<ItemGroup>
<Compile Remove="..\Shared\BindingHelper.cs" />
<Compile Remove="..\Shared\GeoImage.cs" />
<Compile Remove="..\Shared\MapBorderPanel.cs" />
<Compile Remove="..\Shared\MapGraticule.cs" />
<Compile Remove="..\Shared\MapItem.cs" />
<Compile Remove="..\Shared\MapItemsControl.cs" />

View file

@ -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
/// </summary>
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<MapBorderPanel, double>(nameof(BorderWidth));
public static readonly DependencyProperty OnBorderProperty = DependencyProperty.RegisterAttached(
"OnBorder", typeof(bool), typeof(MapBorderPanel), null);
public static readonly DependencyProperty OnBorderProperty =
DependencyPropertyHelper.RegisterAttached<MapBorderPanel, bool>("OnBorder");
public double BorderWidth
{