diff --git a/src/Avalonia.Controls/Utils/OrientationBasedMeasures.cs b/src/Avalonia.Controls/Utils/OrientationBasedMeasures.cs
index 45328398b8..6d529d9a59 100644
--- a/src/Avalonia.Controls/Utils/OrientationBasedMeasures.cs
+++ b/src/Avalonia.Controls/Utils/OrientationBasedMeasures.cs
@@ -1,16 +1,12 @@
-namespace Avalonia.Controls.Utils;
+using Avalonia.Layout;
-internal enum ScrollOrientation
-{
- Horizontal,
- Vertical
-}
+namespace Avalonia.Controls.Utils;
internal interface IOrientationBasedMeasures
{
- ScrollOrientation ScrollOrientation { get; }
+ Orientation ScrollOrientation { get; }
- bool IsVertical => ScrollOrientation is ScrollOrientation.Vertical;
+ bool IsVertical => ScrollOrientation is Orientation.Vertical;
}
internal static class OrientationBasedMeasuresExt
diff --git a/src/Avalonia.Controls/WrapPanel.cs b/src/Avalonia.Controls/WrapPanel.cs
index f1f9306b80..7da3479c5f 100644
--- a/src/Avalonia.Controls/WrapPanel.cs
+++ b/src/Avalonia.Controls/WrapPanel.cs
@@ -165,9 +165,9 @@ namespace Avalonia.Controls
set => SetValue(ItemHeightProperty, value);
}
- private ScrollOrientation ScrollOrientation { get; set; } = ScrollOrientation.Vertical;
+ private Orientation ScrollOrientation { get; set; } = Orientation.Vertical;
- ScrollOrientation IOrientationBasedMeasures.ScrollOrientation => ScrollOrientation;
+ Orientation IOrientationBasedMeasures.ScrollOrientation => ScrollOrientation;
///
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
@@ -175,8 +175,8 @@ namespace Avalonia.Controls
base.OnPropertyChanged(change);
if (change.Property == OrientationProperty)
ScrollOrientation = Orientation is Orientation.Horizontal ?
- ScrollOrientation.Vertical :
- ScrollOrientation.Horizontal;
+ Orientation.Vertical :
+ Orientation.Horizontal;
}
///