<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
                    xmlns:system="clr-namespace:System;assembly=mscorlib"
                    mc:Ignorable="options">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Buttons.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.ListBox.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Scrollbars.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <system:Double x:Key="HamburgerMenuSelectionIndicatorThemeWidth">4</system:Double>
    <system:Double x:Key="HamburgerMenuSelectionIndicatorThemeHeight">24</system:Double>

    <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

    <Style x:Key="HamburgerButtonStyle"
           BasedOn="{StaticResource ChromelessButtonStyle}"
           TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{DynamicResource BlackBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <Grid Background="Transparent">
                        <Grid x:Name="PART_Background"
                              Background="{TemplateBinding Background}"
                              Opacity="0" />
                        <ContentPresenter x:Name="PART_ContentPresenter"
                                          Margin="{TemplateBinding Padding}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Opacity="0.6"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="PART_ContentPresenter" Property="Opacity" Value="0.8" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="False">
                            <Setter TargetName="PART_ContentPresenter" Property="Opacity" Value="0.6" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="#ADADAD" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>

    <QuinticEase x:Key="ScrollBarEaseInOut"
                 EasingMode="EaseInOut"
                 options:Freeze="true" />

    <Style x:Key="HamburgerScrollViewerStyle"
           BasedOn="{StaticResource MetroScrollViewer}"
           TargetType="{x:Type ScrollViewer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid x:Name="Grid" Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="leftColumn" Width="*" />
                            <ColumnDefinition x:Name="rightColumn" Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                                                Grid.Row="0"
                                                Grid.Column="0"
                                                Margin="{TemplateBinding Padding}"
                                                CanContentScroll="{TemplateBinding CanContentScroll}"
                                                CanHorizontallyScroll="False"
                                                CanVerticallyScroll="False"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}" />
                        <ScrollBar x:Name="PART_VerticalScrollBar"
                                   Grid.Row="0"
                                   Grid.Column="0"
                                   Grid.ColumnSpan="2"
                                   HorizontalAlignment="Right"
                                   AutomationProperties.AutomationId="VerticalScrollBar"
                                   Cursor="Arrow"
                                   Maximum="{TemplateBinding ScrollableHeight}"
                                   Minimum="0"
                                   Opacity="0"
                                   ViewportSize="{TemplateBinding ViewportHeight}"
                                   Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                   Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <ScrollBar x:Name="PART_HorizontalScrollBar"
                                   Grid.Row="0"
                                   Grid.RowSpan="2"
                                   Grid.Column="0"
                                   VerticalAlignment="Bottom"
                                   AutomationProperties.AutomationId="HorizontalScrollBar"
                                   Cursor="Arrow"
                                   Maximum="{TemplateBinding ScrollableWidth}"
                                   Minimum="0"
                                   Opacity="0"
                                   Orientation="Horizontal"
                                   ViewportSize="{TemplateBinding ViewportWidth}"
                                   Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                   Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Controls:ScrollViewerHelper.VerticalScrollBarOnLeftSide" Value="True">
                            <Setter TargetName="PART_HorizontalScrollBar" Property="Grid.Column" Value="1" />
                            <Setter TargetName="PART_ScrollContentPresenter" Property="Grid.Column" Value="1" />
                            <Setter TargetName="PART_VerticalScrollBar" Property="HorizontalAlignment" Value="Left" />
                            <Setter TargetName="leftColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="rightColumn" Property="Width" Value="*" />
                        </Trigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsVisible}" Value="True" />
                                <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True" />
                                <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ComputedVerticalScrollBarVisibility}" Value="Visible" />
                                <Condition Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SplitView}}, Path=IsPaneOpen}" Value="True" />
                            </MultiDataTrigger.Conditions>
                            <TriggerBase.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation EasingFunction="{StaticResource ScrollBarEaseInOut}"
                                                         Storyboard.TargetName="PART_VerticalScrollBar"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="1"
                                                         Duration="0:0:0.2" />
                                        <DoubleAnimation EasingFunction="{StaticResource ScrollBarEaseInOut}"
                                                         Storyboard.TargetName="PART_HorizontalScrollBar"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="1"
                                                         Duration="0:0:0.2" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </TriggerBase.EnterActions>
                            <TriggerBase.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation BeginTime="0:0:1"
                                                         EasingFunction="{StaticResource ScrollBarEaseInOut}"
                                                         Storyboard.TargetName="PART_VerticalScrollBar"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="0"
                                                         Duration="0:0:0.5" />
                                        <DoubleAnimation BeginTime="0:0:1"
                                                         EasingFunction="{StaticResource ScrollBarEaseInOut}"
                                                         Storyboard.TargetName="PART_HorizontalScrollBar"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="0"
                                                         Duration="0:0:0.5" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </TriggerBase.ExitActions>
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="HamburgerMenuItemFocusVisualTemplate">
        <Rectangle SnapsToDevicePixels="True"
                   Stroke="Black"
                   StrokeThickness="2"
                   UseLayoutRounding="True" />
    </ControlTemplate>

    <Style x:Key="HamburgerMenuItemStyle"
           BasedOn="{StaticResource MetroListBoxItem}"
           TargetType="{x:Type ListBoxItem}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Controls:ItemHelper.SelectedBackgroundBrush" Value="{DynamicResource AccentColorBrush}" />
        <Setter Property="FocusVisualStyle" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:HamburgerMenu}}, Path=ItemFocusVisualStyle, Mode=OneWay, FallbackValue={x:Null}}" />
        <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}, Path=Foreground, Mode=OneWay}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=OneWay, FallbackValue=true}" />
        <Setter Property="IsTabStop" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:HamburgerMenu}}, Path=IsTabStop, Mode=OneWay, FallbackValue=True}" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Grid Background="{TemplateBinding Background}" RenderOptions.ClearTypeHint="{TemplateBinding RenderOptions.ClearTypeHint}">
                        <Border x:Name="Border"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        <Grid Margin="{TemplateBinding BorderThickness}">
                            <Grid HorizontalAlignment="Left"
                                  VerticalAlignment="Center"
                                  Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:HamburgerMenu}}, Path=ShowSelectionIndicator, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}">
                                <Rectangle x:Name="SelectionIndicator"
                                           Width="{DynamicResource HamburgerMenuSelectionIndicatorThemeWidth}"
                                           Height="{TemplateBinding ActualHeight}"
                                           Fill="{TemplateBinding Foreground}"
                                           Focusable="False"
                                           Opacity="0.0" />
                            </Grid>
                            <ContentPresenter Margin="{TemplateBinding Padding}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Controls:ItemHelper.SelectedForegroundBrush), Mode=OneWay}" />
                            <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Controls:ItemHelper.SelectedBackgroundBrush), Mode=OneWay}" />
                            <Setter TargetName="SelectionIndicator" Property="Opacity" Value="1.0" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="Selector.IsSelectionActive" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Controls:ItemHelper.ActiveSelectionForegroundBrush), Mode=OneWay}" />
                            <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Controls:ItemHelper.ActiveSelectionBackgroundBrush), Mode=OneWay}" />
                        </MultiTrigger>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Controls:ItemHelper.HoverSelectedBackgroundBrush), Mode=OneWay}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Controls:ItemHelper.HoverBackgroundBrush), Mode=OneWay}" />
                        </MultiTrigger>

                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Controls:ItemHelper.DisabledForegroundBrush), Mode=OneWay}" />
                            <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Controls:ItemHelper.DisabledBackgroundBrush), Mode=OneWay}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False" />
                                <Condition Property="IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Controls:ItemHelper.DisabledSelectedForegroundBrush), Mode=OneWay}" />
                            <Setter TargetName="Border" Property="Background" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Controls:ItemHelper.DisabledSelectedBackgroundBrush), Mode=OneWay}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
    </Style>

    <!--  obsolete  -->
    <Style x:Key="HamburgerListBoxItemStyle"
           BasedOn="{StaticResource HamburgerMenuItemStyle}"
           TargetType="{x:Type ListBoxItem}" />

    <Style x:Key="HamburgerMenuListStyle"
           BasedOn="{StaticResource MetroListBox}"
           TargetType="{x:Type ListBox}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="False" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Border Name="Border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <ScrollViewer Padding="{TemplateBinding Padding}"
                                      Controls:ScrollViewerHelper.VerticalScrollBarOnLeftSide="{TemplateBinding Controls:ScrollViewerHelper.VerticalScrollBarOnLeftSide}"
                                      CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
                                      Focusable="False"
                                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                      Style="{StaticResource HamburgerScrollViewerStyle}"
                                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsGrouping" Value="False">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="False" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="VirtualizingStackPanel.IsVirtualizing" Value="False" />
    </Style>

    <!--  obsolete  -->
    <Style x:Key="HamburgerListBoxStyle"
           BasedOn="{StaticResource HamburgerMenuListStyle}"
           TargetType="{x:Type ListBox}" />

    <ControlTemplate x:Key="HamburgerMenuTemplate" TargetType="{x:Type Controls:HamburgerMenu}">
        <Grid>
            <Controls:SplitView x:Name="MainSplitView"
                                DisplayMode="{TemplateBinding DisplayMode}"
                                IsPaneOpen="{Binding IsPaneOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                IsTabStop="False"
                                OpenPaneLength="{TemplateBinding OpenPaneLength}"
                                PaneForeground="{TemplateBinding PaneForeground}"
                                PanePlacement="{TemplateBinding PanePlacement}" PaneBackground="#FFF3F3F5" CompactPaneLength="40">
                <Controls:SplitView.Pane>
                    <Grid x:Name="PaneGrid">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <DockPanel x:Name="PaneHeader"
                                   Grid.Row="0"
                                   Height="{TemplateBinding HamburgerHeight}"
                                   Margin="0 0 0 0"
                                   LastChildFill="True">
                            <Grid x:Name="PaneHeaderGap"
                                  Width="{TemplateBinding HamburgerWidth}"
                                  DockPanel.Dock="Left" />
                            <ContentControl x:Name="PaneHeaderContent"
                                            ContentTemplate="{TemplateBinding HamburgerMenuHeaderTemplate}"
                                            IsTabStop="False" />
                        </DockPanel>
                        <ListBox Name="ButtonsListView"
                                 Grid.Row="1"
                                 Width="{TemplateBinding OpenPaneLength}"
                                 Controls:ScrollViewerHelper.VerticalScrollBarOnLeftSide="{TemplateBinding VerticalScrollBarOnLeftSide}"
                                 AutomationProperties.Name="Menu items"
                                 Foreground="{TemplateBinding PaneForeground}"
                                 ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
                                 ItemTemplate="{TemplateBinding ItemTemplate}"
                                 ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                                 ItemsSource="{TemplateBinding ItemsSource}"
                                 ScrollViewer.VerticalScrollBarVisibility="Auto"
                                 SelectedIndex="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedIndex, Mode=TwoWay}"
                                 SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem, Mode=TwoWay}"
                                 SelectionMode="Single"
                                 Style="{StaticResource HamburgerMenuListStyle}"
                                 TabIndex="1" />
                        <ListBox Name="OptionsListView"
                                 Grid.Row="2"
                                 Width="{TemplateBinding OpenPaneLength}"
                                 Margin="0 20 0 8"
                                 VerticalAlignment="Bottom"
                                 AutomationProperties.Name="Option items"
                                 Foreground="{TemplateBinding PaneForeground}"
                                 ItemContainerStyle="{TemplateBinding OptionsItemContainerStyle}"
                                 ItemTemplate="{TemplateBinding OptionsItemTemplate}"
                                 ItemTemplateSelector="{TemplateBinding OptionsItemTemplateSelector}"
                                 ItemsSource="{TemplateBinding OptionsItemsSource}"
                                 ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                 SelectedIndex="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedOptionsIndex, Mode=TwoWay}"
                                 SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedOptionsItem, Mode=TwoWay}"
                                 SelectionMode="Single"
                                 Style="{StaticResource HamburgerMenuListStyle}"
                                 TabIndex="2" />
                    </Grid>
                </Controls:SplitView.Pane>
                <Controls:TransitioningContentControl x:Name="ContentPart"
                                                      Padding="{TemplateBinding Padding}"
                                                      HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                                      AutomationProperties.Name="Content"
                                                      Content="{TemplateBinding Content}"
                                                      ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                                      ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                                      RestartTransitionOnContentChange="True"
                                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                      Transition="{TemplateBinding ContentTransition}" BorderThickness="1,0,0,0" BorderBrush="#FFDDDDD8" />
            </Controls:SplitView>
            <Button x:Name="HamburgerButton"
                    Width="{TemplateBinding HamburgerWidth}"
                    Height="{TemplateBinding HamburgerHeight}"
                    Margin="0 0 0 8"
                    Padding="{TemplateBinding HamburgerMargin}"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    AutomationProperties.Name="Main button"
                    ContentTemplate="{TemplateBinding HamburgerMenuTemplate}"
                    Foreground="{TemplateBinding PaneForeground}"
                    IsTabStop="{TemplateBinding IsTabStop}"
                    Style="{StaticResource HamburgerButtonStyle}"
                    TabIndex="0"
                    Visibility="{TemplateBinding HamburgerVisibility}" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="PanePlacement" Value="Right">
                <Setter TargetName="HamburgerButton" Property="HorizontalAlignment" Value="Right" />
                <Setter TargetName="PaneHeaderGap" Property="DockPanel.Dock" Value="Right" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

</ResourceDictionary>