<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/TextToolbar/ToolbarItems/ToolbarButton.xaml" />
        <ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/TextToolbar/ToolbarItems/ToolbarSeparator.xaml" />
        <ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/TextToolbar/Symbols/Symbols.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="local:TextToolbar">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TextToolbar">
                    <ScrollViewer HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                  VerticalAlignment="{TemplateBinding VerticalAlignment}"
                                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                  VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                  Background="{TemplateBinding Background}"
                                  HorizontalScrollBarVisibility="Auto"
                                  HorizontalScrollMode="Enabled"
                                  IsTabStop="False"
                                  VerticalScrollBarVisibility="Disabled"
                                  VerticalScrollMode="Disabled">
                        <CommandBar x:Name="Root"
                                    Grid.Row="1"
                                    HorizontalAlignment="Left"
                                    Background="{x:Null}"
                                    IsTabStop="False"
                                    Style="{StaticResource SimpleCommandBar}" />
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SimpleCommandBar"
           TargetType="CommandBar">
        <Setter Property="Height" Value="48" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CommandBar">
                    <Grid x:Name="LayoutRoot">
                        <Grid.Clip>
                            <RectangleGeometry Rect="{Binding TemplateSettings.ClipRect, RelativeSource={RelativeSource Mode=TemplatedParent}}">
                                <RectangleGeometry.Transform>
                                    <TranslateTransform x:Name="ClipGeometryTransform" Y="{Binding TemplateSettings.CompactVerticalDelta, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                </RectangleGeometry.Transform>
                            </RectangleGeometry>
                        </Grid.Clip>
                        <Grid x:Name="ContentRoot"
                              Height="{TemplateBinding Height}"
                              MinHeight="{ThemeResource AppBarThemeCompactHeight}"
                              Margin="{TemplateBinding Padding}"
                              VerticalAlignment="Top"
                              Background="{TemplateBinding Background}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RenderTransform>
                                <TranslateTransform x:Name="ContentTransform" />
                            </Grid.RenderTransform>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Name="ContentControlColumnDefinition"
                                                      Width="*" />
                                    <ColumnDefinition x:Name="PrimaryItemsControlColumnDefinition"
                                                      Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <ContentControl x:Name="ContentControl"
                                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                                ContentTransitions="{TemplateBinding ContentTransitions}"
                                                Foreground="{TemplateBinding Foreground}"
                                                IsTabStop="False" />
                                <ItemsControl x:Name="PrimaryItemsControl"
                                              Grid.Column="1"
                                              MinHeight="{ThemeResource AppBarThemeCompactHeight}"
                                              HorizontalAlignment="Right"
                                              IsTabStop="False">
                                    <ItemsControl.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <StackPanel Orientation="Horizontal" />
                                        </ItemsPanelTemplate>
                                    </ItemsControl.ItemsPanel>
                                </ItemsControl>
                            </Grid>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
