TqkLibrary.AutoGrid
1.2.29
dotnet add package TqkLibrary.AutoGrid --version 1.2.29
NuGet\Install-Package TqkLibrary.AutoGrid -Version 1.2.29
<PackageReference Include="TqkLibrary.AutoGrid" Version="1.2.29" />
paket add TqkLibrary.AutoGrid --version 1.2.29
#r "nuget: TqkLibrary.AutoGrid, 1.2.29"
// Install TqkLibrary.AutoGrid as a Cake Addin #addin nuget:?package=TqkLibrary.AutoGrid&version=1.2.29 // Install TqkLibrary.AutoGrid as a Cake Tool #tool nuget:?package=TqkLibrary.AutoGrid&version=1.2.29
SpicyTaco.WpfToolkit
A magical replacement for the built in WPF Grid and StackPanel.
NOTE: I'm in the process of renaming this project from SpicyTaco.AutoGrid to SpicyTaco.WpfToolkit. This is because I plan to add more useful features to this package beyond just AutoGrid.
Installation
To add SpicyTaco.WpfToolkit to your WPF project, all you have to do is install it from NuGet:
Install-Package SpicyTaco.AutoGrid
Usage Examples
AutoGrid
In order to get
<br/> Sourced from the awesome WpfTutorials
You would typically write XAML that looked like
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Name:"/>
<Label Grid.Row="1" Grid.Column="0" Content="E-Mail:"/>
<Label Grid.Row="2" Grid.Column="0" Content="Comment:"/>
<TextBox Grid.Column="1" Grid.Row="0" Margin="3" />
<TextBox Grid.Column="1" Grid.Row="1" Margin="3" />
<TextBox Grid.Column="1" Grid.Row="2" Margin="3" />
<Button Grid.Column="1" Grid.Row="3" HorizontalAlignment="Right"
MinWidth="80" Margin="3" Content="Send" />
</Grid>
You can simply write
<st:AutoGrid Rows="Auto,Auto,*,28" Columns="Auto,200" Orientation="Vertical">
<Label Content="Name:"/>
<Label Content="E-Mail:"/>
<Label Content="Comment:"/>
<Label />
<TextBox Margin="3" />
<TextBox Margin="3" />
<TextBox Margin="3" />
<Button HorizontalAlignment="Right"
MinWidth="80" Margin="3" Content="Send" />
</st:AutoGrid>
I personally like to put my Label
s with the element they are labeling. So just remove the Orientation
which defaults to Horizontal
and rearrange the elements. You can also pull the common margin up, defining it only once.
<st:AutoGrid Rows="Auto,Auto,*,28" Columns="Auto,200" ChildMargin="3">
<Label Content="Name:"/>
<TextBox/>
<Label Content="E-Mail:"/>
<TextBox/>
<Label Content="Comment:"/>
<TextBox/>
<Label />
<Button HorizontalAlignment="Right"
MinWidth="80" Content="Send" />
</st:AutoGrid>
StackPanel
The built in StackPanel control has always been frustrating to use. When you have a TextBlock
that has a lot of text, it is impossible to wrap that text without setting an explicit width. Also, a StackPanel does not fill its container.
Also, I've always wanted a simple container which would apply a margin but only between child elements. This allows me to control the margin of the parent and the spacing between each child separately and cleanly.
<st:StackPanel Orientation="Horizontal" MarginBetweenChildren="10" Margin="10">
<Button Content="Info" HorizontalAlignment="Left" st:StackPanel.Fill="Fill"/>
<Button Content="Cancel"/>
<Button Content="Save"/>
</st:StackPanel>
Credits
<img src="icon/icon_61620.png" alt="Icon" style="width: 128px; height: 128px;"/><br/> Furious designed by Matt Brooks from the Noun Project
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0-windows7.0 is compatible. net6.0-windows was computed. net6.0-windows7.0 is compatible. net7.0-windows was computed. net7.0-windows7.0 is compatible. net8.0-windows was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- No dependencies.
-
net5.0-windows7.0
- No dependencies.
-
net6.0-windows7.0
- No dependencies.
-
net7.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|