<UserControl x:Class="MaterialDesignColors.WpfExample.Buttons"
             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:wpfExample="clr-namespace:MaterialDesignColors.WpfExample"
             xmlns:system="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.CheckBox.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ListBox.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToggleButton.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid VerticalAlignment="Top">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock>Buttons</TextBlock>
        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 24 0 0">
            <Button Style="{StaticResource MaterialDesignFloatingActionLightButton}"
                    Margin="0 0 8 0" HorizontalAlignment="Left"
                    ToolTip="X">
                <Viewbox Width="24" Height="24">
                    <Canvas Width="24" Height="24">
                        <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" />
                    </Canvas>
                </Viewbox>
            </Button>
            <Button Style="{StaticResource MaterialDesignFloatingActionButton}"
                    Margin="0 0 8 0" HorizontalAlignment="Left">
                <Viewbox Width="24" Height="24">
                    <Canvas Width="24" Height="24">
                        <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" />
                    </Canvas>
                </Viewbox>
            </Button>
            <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}"
                    Margin="0 0 8 0" HorizontalAlignment="Left">
                <Viewbox Width="24" Height="24">
                    <Canvas Width="24" Height="24">
                        <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" />
                    </Canvas>
                </Viewbox>
            </Button>
            <Button Style="{StaticResource MaterialDesignFloatingActionAccentButton}"
                    Margin="0 0 8 0" HorizontalAlignment="Left">
                <Viewbox Width="24" Height="24">
                    <Canvas Width="24" Height="24">
                        <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" />
                    </Canvas>
                </Viewbox>
            </Button>
        </StackPanel>
        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0 16 0 0">
            <Button Style="{StaticResource MaterialDesignRaisedLightButton}" Margin="0 0 8 0" Width="88"
                    ToolTip="Resource name: MaterialDesignRaisedLightButton">
                LIGHT
            </Button>
            <Button Style="{StaticResource MaterialDesignRaisedButton}" Margin="0 0 8 0" Width="88"
                    ToolTip="Resource name: MaterialDesignRaisedButton">
                MID
            </Button>
            <Button Style="{StaticResource MaterialDesignRaisedDarkButton}" Margin="0 0 8 0" Width="88"
                    ToolTip="Resource name: MaterialDesignRaisedLightDarkButton">
                DARK
            </Button>
            <Button Style="{StaticResource MaterialDesignRaisedAccentButton}" Margin="0 0 8 0" Width="88"
                    ToolTip="Resource name: MaterialDesignRaisedAccentButton">
                ACCENT
            </Button>
        </StackPanel>
        <StackPanel Grid.Row="3"  Margin="256 16 0 0" Orientation="Horizontal">
            <Button Style="{StaticResource MaterialDesignFlatButton}" Click="ButtonBase_OnClick">ACCEPT</Button>
            <Button Style="{StaticResource MaterialDesignFlatButton}">CANCEL</Button>
        </StackPanel>
        <TextBlock Margin="0 24 0 0" Grid.Row="4">Toggles</TextBlock>
        <StackPanel Grid.Row="5" Margin="0 24 0 0" Orientation="Horizontal">
            <ToggleButton Content="C" Margin="0 0 8 8" Style="{StaticResource MaterialDesignActionLightToggleButton}" IsChecked="True" />
            <ToggleButton Content="H" Margin="0 0 8 8" Style="{StaticResource MaterialDesignActionToggleButton}"/>
            <!-- checkbox style same as toggle button -->
            <CheckBox Content="E" Margin="0 0 8 8" Style="{StaticResource MaterialDesignActionDarkCheckBox}"/>
            <ToggleButton Content="C" Margin="0 0 8 8" Style="{StaticResource MaterialDesignActionAccentToggleButton}"/>
            <ToggleButton Content="K" Margin="0 0 8 8" Style="{StaticResource MaterialDesignActionToggleButton}" IsEnabled="False"/>
            <ToggleButton Margin="0 0 8 8" Style="{StaticResource MaterialDesignActionToggleButton}">
                <Image Source="Resources/ProfilePic.jpg"></Image>
            </ToggleButton>
        </StackPanel>
        <StackPanel Grid.Row="6" Margin="0 16 0 0" Orientation="Horizontal">
            <RadioButton Style="{StaticResource MaterialDesignRadioButton}" Margin="0 0 8 8" VerticalAlignment="Center" IsChecked="True">
                Radio
            </RadioButton>
            <RadioButton Style="{StaticResource MaterialDesignRadioButton}" Margin="0 0 8 8" VerticalAlignment="Center">
                Ga Ga
            </RadioButton>
            <CheckBox Style="{StaticResource MaterialDesignCheckBox}" Margin="0 0 8 8" VerticalAlignment="Center">
                Check
            </CheckBox>
            <CheckBox Style="{StaticResource MaterialDesignCheckBox}" Margin="0 0 8 8" VerticalAlignment="Center" IsChecked="True">
                Mate
            </CheckBox>
        </StackPanel>
        <StackPanel Grid.Row="7"  Margin="0 16 0 0" Orientation="Horizontal">
            <ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Center" Margin="0 0 8 8"  />
            <ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Center" Margin="0 0 8 8" IsChecked="True" />
        </StackPanel>
        <StackPanel Grid.Row="8"  Margin="0 16 0 0" Orientation="Horizontal">
            <ToggleButton Style="{StaticResource MaterialDesignFlatToggleButton}">
                <Viewbox Width="21" Height="21">
                    <Canvas Width="24" Height="24">
                        <Path Data="M16.5,6V17.5A4,4 0 0,1 12.5,21.5A4,4 0 0,1 8.5,17.5V5A2.5,2.5 0 0,1 11,2.5A2.5,2.5 0 0,1 13.5,5V15.5A1,1 0 0,1 12.5,16.5A1,1 0 0,1 11.5,15.5V6H10V15.5A2.5,2.5 0 0,0 12.5,18A2.5,2.5 0 0,0 15,15.5V5A4,4 0 0,0 11,1A4,4 0 0,0 7,5V17.5A5.5,5.5 0 0,0 12.5,23A5.5,5.5 0 0,0 18,17.5V6H16.5Z" 
                                StrokeThickness="4"
                                Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ToggleButton}}, Path=Foreground}" />
                    </Canvas>
                </Viewbox>
            </ToggleButton>
            <ToggleButton Style="{StaticResource MaterialDesignFlatPrimaryToggleButton}"
                           Margin="8 0 0 0" 
                          IsChecked="True">
                <Viewbox Width="21" Height="21">
                    <Canvas Width="24" Height="24">
                        <Path Data="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z" 
                                Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ToggleButton}}, Path=Foreground}" />
                    </Canvas>
                </Viewbox>
            </ToggleButton>
            <ToggleButton Style="{StaticResource MaterialDesignFlatPrimaryToggleButton}"
                            IsEnabled="False" Margin="8 0 0 0">
                <Viewbox Width="21" Height="21">
                    <Canvas Width="24" Height="24">
                        <Path Data="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z" 
                                Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ToggleButton}}, Path=Foreground}" />
                    </Canvas>
                </Viewbox>
            </ToggleButton>
        </StackPanel>
    </Grid>
</UserControl>
