https://github.com/SpicyTaco/SpicyTaco.AutoGrid
A magical replacement for the built in WPF Grid and StackPanel
https://github.com/SpicyTaco/SpicyTaco.AutoGrid
autogrid c-sharp dotnet margin panel stackpanel wpf wpf-grid wpftoolkit xaml
Last synced: 2 months ago
JSON representation
A magical replacement for the built in WPF Grid and StackPanel
- Host: GitHub
- URL: https://github.com/SpicyTaco/SpicyTaco.AutoGrid
- Owner: SpicyTaco
- License: mit
- Created: 2014-06-22T22:29:33.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-08-14T07:46:15.000Z (over 2 years ago)
- Last Synced: 2026-01-14T13:39:03.785Z (3 months ago)
- Topics: autogrid, c-sharp, dotnet, margin, panel, stackpanel, wpf, wpf-grid, wpftoolkit, xaml
- Language: C#
- Homepage:
- Size: 181 KB
- Stars: 82
- Watchers: 5
- Forks: 19
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
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

[Sourced from the awesome WpfTutorials](http://wpftutorial.net/GridLayout.html)
You would typically write XAML that looked like
```xml
```
You can simply write
```xml
```
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.
```xml
```
**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.
```xml
```
Credits
-------

[Furious designed by Matt Brooks from the Noun Project](http://thenounproject.com/Mattebrooks/icon/61620/)