An open API service indexing awesome lists of open source software.

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

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

![Form Image](v2_gridlayout.png)

[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
-------

Icon

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