Browse Source

Fix horizontal StackLayout.

pull/2603/head
Steven Kirk 7 years ago
parent
commit
ac660567f7
  1. 4
      src/Avalonia.Layout/StackLayout.cs

4
src/Avalonia.Layout/StackLayout.cs

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

Loading…
Cancel
Save