<ResourceDictionary 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" 
                    mc:Ignorable="d">

    <Style TargetType="{x:Type Library}">
        <Setter Property="Background" Value="Yellow" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Library}">
                    <Grid d:DesignWidth="1500" d:DesignHeight="960"
                          d:DataContext="{x:Static DesignMainViewModel.DesignIntance}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <FadeImage x:Name="PART_ImageBackground"
                                   Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"
                                   HorizontalAlignment="Center" VerticalAlignment="Top" />

                        <TopPanel DockPanel.Dock="Top" Grid.Row="0" />

                        <Border Grid.Row="1"
                                BorderBrush="{DynamicResource PanelSeparatorBrush}">
                            <Border.Style>
                                <Style TargetType="Border">
                                    <Setter Property="BorderThickness" Value="0,1,0,0" />
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Settings SidebarPosition}" Value="Left">
                                            <Setter Property="BorderThickness" Value="1,1,0,0" />
                                        </DataTrigger>
                                        <DataTrigger Binding="{Settings SidebarPosition}" Value="Right">
                                            <Setter Property="BorderThickness" Value="0,1,1,0" />
                                        </DataTrigger>
                                        <DataTrigger Binding="{Settings SidebarPosition}" Value="Bottom">
                                            <Setter Property="BorderThickness" Value="0,1,0,1" />
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Border.Style>

                            <DockPanel>
                                <FilterPanel x:Name="PART_FilterPanel"
                                         DockPanel.Dock="{Settings FilterPanelPosition}"
                                         Width="{Settings FilterPanelWitdh}"
                                         Visibility="{Settings FilterPanelVisible}"/>

                                <ExplorerPanel Visibility="{Settings ExplorerPanelVisible}"
                                           DockPanel.Dock="{Settings ExplorerPanelPosition}"
                                           Width="{Settings ExplorerPanelWitdh}"/>

                                <Grid DockPanel.Dock="Left">
                                    <LibraryDetailsView x:Name="PART_ViewDetails" />
                                    <LibraryGridView x:Name="PART_ViewGrid" />
                                    <LibraryListView x:Name="PART_ViewList" />
                                </Grid>
                            </DockPanel>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>