All Projects → SpicyTaco → SpicyTaco.AutoGrid

SpicyTaco / SpicyTaco.AutoGrid

Licence: MIT license
A magical replacement for the built in WPF Grid and StackPanel

Programming Languages

C#
18002 projects
coffeescript
4710 projects

Projects that are alternatives of or similar to SpicyTaco.AutoGrid

Toast
🍞 The rounded and animated Android Toast for .NET WPF/XAML
Stars: ✭ 25 (-62.69%)
Mutual labels:  xaml, wpf
Fluent.ribbon
WPF Ribbon control like in Office
Stars: ✭ 1,895 (+2728.36%)
Mutual labels:  xaml, wpf
Arcgis Toolkit Dotnet
Toolkit for ArcGIS Runtime SDK for .NET
Stars: ✭ 125 (+86.57%)
Mutual labels:  xaml, wpf
FileRenamerDiff
A File Renamer App featuring a difference display before and after the change.
Stars: ✭ 32 (-52.24%)
Mutual labels:  xaml, wpf
Code Samples
Just some code samples for MahApps and other experiments...
Stars: ✭ 205 (+205.97%)
Mutual labels:  xaml, wpf
Aura.ui
A Library with a lot of Controls for AvaloniaUI
Stars: ✭ 114 (+70.15%)
Mutual labels:  xaml, wpf
Steamtools
🛠「Steam++」是一个开源跨平台的多功能Steam工具箱。
Stars: ✭ 4,458 (+6553.73%)
Mutual labels:  xaml, wpf
Xamlviewer
XAML Viewer is a lightweight XAML editor.
Stars: ✭ 87 (+29.85%)
Mutual labels:  xaml, wpf
Modernwpf
Modern styles and controls for your WPF applications
Stars: ✭ 2,610 (+3795.52%)
Mutual labels:  xaml, wpf
Gridextra
Custom panel controls for WPF/UWP.
Stars: ✭ 149 (+122.39%)
Mutual labels:  xaml, wpf
Xaml Code Experiences
A collection of the experiences I have collected during days of Xamarin and Wpf, while following the MVVM design pattern.
Stars: ✭ 114 (+70.15%)
Mutual labels:  xaml, wpf
Wpftoolkit
All the controls missing in WPF. Over 1 million downloads.
Stars: ✭ 2,970 (+4332.84%)
Mutual labels:  xaml, wpf
Snoopwpf
Snoop - The WPF Spy Utility
Stars: ✭ 1,286 (+1819.4%)
Mutual labels:  xaml, wpf
Materialdesigninxamltoolkit
Google's Material Design in XAML & WPF, for C# & VB.Net.
Stars: ✭ 11,603 (+17217.91%)
Mutual labels:  xaml, wpf
Simplewpfreporting
Reporting in WPF (XAML) made easy
Stars: ✭ 87 (+29.85%)
Mutual labels:  xaml, wpf
Forge.forms
Dynamically generated forms and dialogs in WPF
Stars: ✭ 131 (+95.52%)
Mutual labels:  xaml, wpf
Reactivehistory
Reactive undo/redo framework for .NET.
Stars: ✭ 82 (+22.39%)
Mutual labels:  xaml, wpf
Xamarin Forms Gtk Movies Sample
The Movie DB Xamarin.Forms Sample
Stars: ✭ 83 (+23.88%)
Mutual labels:  xaml, wpf
Mvvmvalidation
Lightweight library that helps reduce boilerplate when implementing validation in XAML MVVM applications
Stars: ✭ 141 (+110.45%)
Mutual labels:  xaml, wpf
Handycontrol
Contains some simple and commonly used WPF controls
Stars: ✭ 3,349 (+4898.51%)
Mutual labels:  xaml, wpf

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
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 /> <!-- Empty placeholder for lower left corner -->
    
    <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 Labels 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 /><!-- Empty placeholder for lower left corner -->
    <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

Icon
Furious designed by Matt Brooks from the Noun Project

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].