diff --git a/MapControl/Shared/MapTileLayerBase.cs b/MapControl/Shared/MapTileLayerBase.cs index 5468ac3b..1d478c6b 100644 --- a/MapControl/Shared/MapTileLayerBase.cs +++ b/MapControl/Shared/MapTileLayerBase.cs @@ -11,12 +11,16 @@ using System.Windows.Controls; using System.Windows.Media; using System.Windows.Threading; #elif UWP +using Windows.UI.Composition; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Hosting; using Windows.UI.Xaml.Media; #elif WINUI +using Microsoft.UI.Composition; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Hosting; using Microsoft.UI.Xaml.Media; using DispatcherTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer; #endif @@ -68,8 +72,11 @@ namespace MapControl updateTimer.Tick += async (s, e) => await Update(false); MapPanel.SetRenderTransform(this, new MatrixTransform()); -#if UWP || WINUI +#if WPF + RenderOptions.SetEdgeMode(this, EdgeMode.Aliased); +#elif UWP || WINUI MapPanel.InitMapElement(this); + ElementCompositionPreview.GetElementVisual(this).BorderMode = CompositionBorderMode.Hard; #endif }