diff --git a/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml b/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml index 51cd210e8d..7e1e3e2f6c 100644 --- a/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml +++ b/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml @@ -14121,6 +14121,11 @@ The content is stretched to fill the available space. + + + The items are evenly distributed within the alignment container along the main axis. + + Describes the horizontal positioning of a . @@ -15128,6 +15133,16 @@ The content is aligned to the bottom + + + The content is stretched to fill the available space. + + + + + The items are evenly distributed within the alignment container along the main axis. + + Describes the vertical positioning of a . diff --git a/src/Core/Components/Stack/FluentStack.razor.cs b/src/Core/Components/Stack/FluentStack.razor.cs index 59c6ed2c40..fec5010d1d 100644 --- a/src/Core/Components/Stack/FluentStack.razor.cs +++ b/src/Core/Components/Stack/FluentStack.razor.cs @@ -87,6 +87,7 @@ private string GetHorizontalAlignment() HorizontalAlignment.Right => "end", HorizontalAlignment.End => "end", HorizontalAlignment.Stretch => "stretch", + HorizontalAlignment.SpaceBetween => Orientation == Orientation.Vertical ? "start" : "space-between", _ => "start", }; } @@ -98,6 +99,8 @@ private string GetVerticalAlignment() VerticalAlignment.Top => "start", VerticalAlignment.Center => "center", VerticalAlignment.Bottom => "end", + VerticalAlignment.Stretch => "stretch", + VerticalAlignment.SpaceBetween => Orientation == Orientation.Horizontal ? "start" : "space-between", _ => "start", }; } diff --git a/src/Core/Enums/HorizontalAlignement.cs b/src/Core/Enums/HorizontalAlignement.cs index 6686a1e34a..4a4b0d989a 100644 --- a/src/Core/Enums/HorizontalAlignement.cs +++ b/src/Core/Enums/HorizontalAlignement.cs @@ -34,4 +34,9 @@ public enum HorizontalAlignment /// The content is stretched to fill the available space. /// Stretch, + + /// + /// The items are evenly distributed within the alignment container along the main axis. + /// + SpaceBetween, } diff --git a/src/Core/Enums/VerticalAlignment.cs b/src/Core/Enums/VerticalAlignment.cs index a84598f366..a61c7bbc79 100644 --- a/src/Core/Enums/VerticalAlignment.cs +++ b/src/Core/Enums/VerticalAlignment.cs @@ -19,4 +19,14 @@ public enum VerticalAlignment /// The content is aligned to the bottom /// Bottom, + + /// + /// The content is stretched to fill the available space. + /// + Stretch, + + /// + /// The items are evenly distributed within the alignment container along the main axis. + /// + SpaceBetween, }