https://github.com/jerry08/autogrid
A magical replacement for the built in WPF Grid and StackPanel
https://github.com/jerry08/autogrid
autogrid csharp dotnet dotnet-core margin panel stackpanel wpf wpf-grid wpftoolkit xaml
Last synced: 4 months ago
JSON representation
A magical replacement for the built in WPF Grid and StackPanel
- Host: GitHub
- URL: https://github.com/jerry08/autogrid
- Owner: jerry08
- Created: 2022-03-15T16:54:18.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-15T17:01:03.000Z (almost 4 years ago)
- Last Synced: 2024-11-02T00:42:02.830Z (about 1 year ago)
- Topics: autogrid, csharp, dotnet, dotnet-core, margin, panel, stackpanel, wpf, wpf-grid, wpftoolkit, xaml
- Language: C#
- Homepage:
- Size: 29.3 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
WpfToolkit
==================
A magical replacement for the built in WPF Grid and StackPanel.
> **NOTE:** I'm in the process of renaming this project from AutoGrid to WpfToolkit. This is because I plan to add more useful features to this package beyond just AutoGrid.
## Installation
To add WpfToolkit to your WPF project, all you have to do is install it from NuGet:
```
Install-Package 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
```