mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Set EdgeMode/BorderMode only in MapTileLayerBase
This commit is contained in:
parent
f029291413
commit
bcdb22a048
|
|
@ -11,12 +11,16 @@ using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
#elif UWP
|
#elif UWP
|
||||||
|
using Windows.UI.Composition;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using Windows.UI.Xaml.Hosting;
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
|
using Microsoft.UI.Composition;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
|
using Microsoft.UI.Xaml.Hosting;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
using DispatcherTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer;
|
using DispatcherTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -68,7 +72,10 @@ namespace MapControl
|
||||||
updateTimer.Tick += async (s, e) => await Update(false);
|
updateTimer.Tick += async (s, e) => await Update(false);
|
||||||
|
|
||||||
MapPanel.SetRenderTransform(this, new MatrixTransform());
|
MapPanel.SetRenderTransform(this, new MatrixTransform());
|
||||||
#if UWP || WINUI
|
#if WPF
|
||||||
|
RenderOptions.SetEdgeMode(this, EdgeMode.Aliased);
|
||||||
|
#elif UWP || WINUI
|
||||||
|
ElementCompositionPreview.GetElementVisual(this).BorderMode = CompositionBorderMode.Hard;
|
||||||
MapPanel.InitMapElement(this);
|
MapPanel.InitMapElement(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,11 +81,6 @@ namespace MapControl
|
||||||
FlowDirectionProperty.OverrideMetadata(typeof(MapBase), new FrameworkPropertyMetadata(FlowDirection.LeftToRight) { Inherits = false });
|
FlowDirectionProperty.OverrideMetadata(typeof(MapBase), new FrameworkPropertyMetadata(FlowDirection.LeftToRight) { Inherits = false });
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapBase()
|
|
||||||
{
|
|
||||||
RenderOptions.SetEdgeMode(this, EdgeMode.Aliased);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the EasingFunction of the Center, ZoomLevel and Heading animations.
|
/// Gets or sets the EasingFunction of the Center, ZoomLevel and Heading animations.
|
||||||
/// The default value is a QuadraticEase with EasingMode.EaseOut.
|
/// The default value is a QuadraticEase with EasingMode.EaseOut.
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,12 @@
|
||||||
|
|
||||||
#if UWP
|
#if UWP
|
||||||
using Windows.UI;
|
using Windows.UI;
|
||||||
using Windows.UI.Composition;
|
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Hosting;
|
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
using Windows.UI.Xaml.Media.Animation;
|
using Windows.UI.Xaml.Media.Animation;
|
||||||
#else
|
#else
|
||||||
using Microsoft.UI;
|
using Microsoft.UI;
|
||||||
using Microsoft.UI.Composition;
|
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Hosting;
|
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
using Microsoft.UI.Xaml.Media.Animation;
|
using Microsoft.UI.Xaml.Media.Animation;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -89,8 +85,6 @@ namespace MapControl
|
||||||
FlowDirection = FlowDirection.LeftToRight;
|
FlowDirection = FlowDirection.LeftToRight;
|
||||||
|
|
||||||
SizeChanged += OnSizeChanged;
|
SizeChanged += OnSizeChanged;
|
||||||
|
|
||||||
ElementCompositionPreview.GetElementVisual(this).BorderMode = CompositionBorderMode.Hard;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue