<UserControl x:Class="MaterialDesignColors.WpfExample.Lists"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:MaterialDesignColors.WpfExample"
             xmlns:domain="clr-namespace:MaterialDesignColors.WpfExample.Domain"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToggleButton.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid Margin="8">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <ListBox Grid.Column="0">
            <TextBlock>Plain</TextBlock>
            <TextBlock>Old</TextBlock>
            <TextBlock>ListBox</TextBlock>
            <TextBlock>Full of junk</TextBlock>
        </ListBox>
        <!-- piece together your own items control to create some nice stuff that will make everyone think you are cool. and rightly so, because you are cool.  you might even be a hipster for all I know -->
        <ItemsControl Grid.Column="1" ItemsSource="{Binding Items1}"
                      Grid.IsSharedSizeScope="True"
                      Margin="12 0 12 0">
            <ItemsControl.ItemTemplate>
                <DataTemplate DataType="{x:Type domain:SelectableViewModel}">
                    <Border x:Name="Border" Padding="8">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition SharedSizeGroup="Checkerz" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <CheckBox VerticalAlignment="Center" IsChecked="{Binding IsSelected}"/>
                            <StackPanel Margin="8 0 0 0" Grid.Column="1">
                                <TextBlock FontWeight="Bold" Text="{Binding Name}" />
                                <TextBlock Text="{Binding Description}" />
                            </StackPanel>
                        </Grid>
                    </Border>
                    <DataTemplate.Triggers>
                        <DataTrigger Binding="{Binding IsSelected}" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource MaterialDesignSelection}" />
                        </DataTrigger>
                    </DataTemplate.Triggers>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <!-- and here's another -->
        <ItemsControl Grid.Column="2" ItemsSource="{Binding Items2}"
                      Grid.IsSharedSizeScope="True">
            <ItemsControl.ItemTemplate>
                <DataTemplate DataType="{x:Type domain:SelectableViewModel}">
                    <Border x:Name="Border" Padding="8" BorderThickness="0 0 0 1" BorderBrush="{DynamicResource MaterialDesignDivider}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition SharedSizeGroup="Checkerz" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <ToggleButton VerticalAlignment="Center" IsChecked="{Binding IsSelected}"
                                          Style="{StaticResource MaterialDesignActionLightToggleButton}"
                                          Content="{Binding Code}" />
                            <StackPanel Margin="8 0 0 0" Grid.Column="1">
                                <TextBlock FontWeight="Bold" Text="{Binding Name}" />
                                <TextBlock Text="{Binding Description}" />
                            </StackPanel>
                        </Grid>
                    </Border>
                    <DataTemplate.Triggers>
                        <DataTrigger Binding="{Binding IsSelected}" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource MaterialDesignSelection}" />
                        </DataTrigger>
                    </DataTemplate.Triggers>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</UserControl>
