A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
Fixed stack panel
Etienne Baudoux15857bde27b7
diff --git a/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor b/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razorindex a0fcab1e5..c3b586f47 100644--- a/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor+++ b/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor@@ -2,6 +2,6 @@@inherits StyledComponentBase-<div class="@ClassValue" style="@StyleValue" @attributes="AdditionalAttributes">+<div id="@Id" @ref="@Element" class="@ClassValue" style="@StyleValue" @attributes="AdditionalAttributes">@ChildContent</div>\ No newline at end of filediff --git a/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.cs b/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.csindex 2c61b22c0..fba694f0a 100644--- a/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.cs+++ b/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.cs@@ -52,10 +52,6 @@ public partial class StackPanel : StyledComponentBase.Build();protected string? StyleValue => new StyleBuilder()- .AddStyle("align-items", GetHorizontalAlignment(), () => Orientation == Orientation.Vertical)- .AddStyle("justify-content", GetVerticalAlignment(), () => Orientation == Orientation.Vertical)- .AddStyle("justify-content", GetHorizontalAlignment(), () => Orientation == Orientation.Horizontal)- .AddStyle("align-items", GetVerticalAlignment(), () => Orientation == Orientation.Horizontal).AddStyle("column-gap", HorizontalGap.ToPx(), () => HorizontalGap.HasValue).AddStyle("row-gap", VerticalGap.ToPx(), () => VerticalGap.HasValue).AddStyle("width", Width, () => !string.IsNullOrEmpty(Width))diff --git a/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.css b/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.cssdeleted file mode 100644index 139848201..000000000--- a/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.css+++ /dev/null@@ -1,9 +0,0 @@-.stack-vertical {- display: flex;- flex-direction: column;-}--.stack-horizontal {- display: flex;- flex-direction: row;-}\ No newline at end of filediff --git a/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.scss b/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.scssnew file mode 100644index 000000000..570413836--- /dev/null+++ b/src/app/dev/DevToys.Blazor/Components/StackPanel/StackPanel.razor.scss@@ -0,0 +1,15 @@+.stack-vertical {+ display: flex;+ flex-direction: column;+ flex-wrap: nowrap;+ align-items: stretch;+ justify-content: stretch;+}++.stack-horizontal {+ display: flex;+ flex-direction: row;+ flex-wrap: nowrap;+ align-items: center;+ justify-content: normal;+}\ No newline at end of filediff --git a/src/app/dev/DevToys.Blazor/Pages/Index.razor b/src/app/dev/DevToys.Blazor/Pages/Index.razorindex b70b54b27..64346c834 100644--- a/src/app/dev/DevToys.Blazor/Pages/Index.razor+++ b/src/app/dev/DevToys.Blazor/Pages/Index.razor@@ -89,6 +89,7 @@{<div class="entranceThemeTransition" style="display: contents"><ScrollViewer>+ <StackPanel Orientation="Orientation.Vertical"><TextBlock Appearance="TextBlockAppearance.TitleLarge" Text="@guiToolViewItem.ToolInstance.LongOrShortDisplayTitle" /><!-- TODO: Place here a component that takes in argument the guiToolViewItem -->@@ -160,6 +161,7 @@@item</ItemTemplate></ListBox>+ </StackPanel></ScrollViewer></div>}