diff --git a/src/Avalonia.Controls/Control.cs b/src/Avalonia.Controls/Control.cs index bd0ae14b6d..18ca1437f8 100644 --- a/src/Avalonia.Controls/Control.cs +++ b/src/Avalonia.Controls/Control.cs @@ -67,7 +67,7 @@ namespace Avalonia.Controls /// public static readonly AttachedProperty FlowDirectionProperty = AvaloniaProperty.RegisterAttached(nameof(FlowDirection), inherits: true); - + private DataTemplates? _dataTemplates; private IControl? _focusAdorner; private AutomationPeer? _automationPeer; @@ -335,25 +335,18 @@ namespace Avalonia.Controls private void InvalidateFlowDirection() { - bool parentShouldGetMirrored = false; - bool thisShouldGetMirrored = ShouldPresentedMirrored(); + bool parentShouldPresentedMirrored = false; + bool thisShouldPresentedMirrored = ShouldPresentedMirrored(); var parent = this.FindAncestorOfType(); if (parent != null) { - parentShouldGetMirrored = parent.ShouldPresentedMirrored(); + parentShouldPresentedMirrored = parent.ShouldPresentedMirrored(); } - bool shouldApplyMirrorTransform = thisShouldGetMirrored != parentShouldGetMirrored; - - if (shouldApplyMirrorTransform) - { - IsMirrorTransform = true; - } - else - { - IsMirrorTransform = false; - } + bool shouldApplyMirrorTransform = thisShouldPresentedMirrored != parentShouldPresentedMirrored; + + IsMirrorTransform = shouldApplyMirrorTransform; } private void NotifyDescendantFlowDirection()