From cb4dff8bcbf77e15aa7226a63bbe121d3cc53ecd Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Wed, 12 Nov 2025 22:18:12 +0100 Subject: [PATCH] Set FlowDirection in MapPanel constructor --- MapControl/Avalonia/MapBase.Avalonia.cs | 5 ----- MapControl/Shared/MapPanel.cs | 1 + MapControl/WPF/MapBase.WPF.cs | 5 ----- MapControl/WinUI/MapBase.WinUI.cs | 2 -- 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/MapControl/Avalonia/MapBase.Avalonia.cs b/MapControl/Avalonia/MapBase.Avalonia.cs index a225c6af..df48b817 100644 --- a/MapControl/Avalonia/MapBase.Avalonia.cs +++ b/MapControl/Avalonia/MapBase.Avalonia.cs @@ -88,11 +88,6 @@ namespace MapControl Animation.RegisterCustomAnimator(); } - public MapBase() - { - FlowDirection = FlowDirection.LeftToRight; - } - public double ActualWidth => Bounds.Width; public double ActualHeight => Bounds.Height; diff --git a/MapControl/Shared/MapPanel.cs b/MapControl/Shared/MapPanel.cs index ac7a26de..516a7b39 100644 --- a/MapControl/Shared/MapPanel.cs +++ b/MapControl/Shared/MapPanel.cs @@ -57,6 +57,7 @@ namespace MapControl { if (this is MapBase) { + FlowDirection = FlowDirection.LeftToRight; SetValue(ParentMapProperty, this); } #if UWP || WINUI diff --git a/MapControl/WPF/MapBase.WPF.cs b/MapControl/WPF/MapBase.WPF.cs index 3fb8f612..a1f509b8 100644 --- a/MapControl/WPF/MapBase.WPF.cs +++ b/MapControl/WPF/MapBase.WPF.cs @@ -76,11 +76,6 @@ namespace MapControl DefaultStyleKeyProperty.OverrideMetadata(typeof(MapBase), new FrameworkPropertyMetadata(typeof(MapBase))); } - public MapBase() - { - FlowDirection = FlowDirection.LeftToRight; - } - /// /// Gets or sets the EasingFunction of the Center, ZoomLevel and Heading animations. /// The default value is a QuadraticEase with EasingMode.EaseOut. diff --git a/MapControl/WinUI/MapBase.WinUI.cs b/MapControl/WinUI/MapBase.WinUI.cs index 8abfee7e..124e9307 100644 --- a/MapControl/WinUI/MapBase.WinUI.cs +++ b/MapControl/WinUI/MapBase.WinUI.cs @@ -78,8 +78,6 @@ namespace MapControl style.Seal(); Style = style; - FlowDirection = FlowDirection.LeftToRight; - SizeChanged += OnSizeChanged; }