Default Map Background

This commit is contained in:
ClemensFischer 2024-05-24 09:13:41 +02:00
parent 25dc5dc139
commit 3c907c3345
6 changed files with 11 additions and 7 deletions

View file

@ -1,4 +1,7 @@

// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
// Copyright © 2024 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
using Avalonia.Controls;
using System;

View file

@ -6,6 +6,7 @@ global using Avalonia;
using Avalonia.Animation;
using Avalonia.Animation.Easings;
using Avalonia.Controls;
using Avalonia.Media;
using Avalonia.Styling;
using System.Threading;
using System.Threading.Tasks;
@ -75,16 +76,12 @@ namespace MapControl
static MapBase()
{
BackgroundProperty.OverrideDefaultValue(typeof(MapBase), Brushes.White);
ClipToBoundsProperty.OverrideDefaultValue(typeof(MapBase), true);
Animation.RegisterCustomAnimator<Location, LocationAnimator>();
}
public MapBase()
{
MapProjectionPropertyChanged(MapProjection);
}
internal Size RenderSize => Bounds.Size;
protected override void OnSizeChanged(SizeChangedEventArgs e)