Explorar el Código

Fix horizontal StackLayout.

Steven Kirk hace 6 años
padre
commit
ac660567f7
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/Avalonia.Layout/StackLayout.cs

+ 3 - 1
src/Avalonia.Layout/StackLayout.cs

@@ -293,9 +293,11 @@ namespace Avalonia.Layout
         {
             if (e.Property == OrientationProperty)
             {
+                var orientation = (Orientation)e.NewValue;
+
                 //Note: For StackLayout Vertical Orientation means we have a Vertical ScrollOrientation.
                 //Horizontal Orientation means we have a Horizontal ScrollOrientation.
-                _orientation.ScrollOrientation = (ScrollOrientation)e.NewValue;
+                _orientation.ScrollOrientation = orientation == Orientation.Horizontal ? ScrollOrientation.Horizontal : ScrollOrientation.Vertical;
             }
 
             InvalidateLayout();