<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="DataGirdView_UI" TargetType="DataGridCell">
        <Setter Property="Background" Value="Black"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="FontSize" Value="20"/>
    </Style>

    <Style x:Key="DatePicker_Black" TargetType="DatePicker">

        <Setter Property="Foreground" Value="White">
            
        </Setter>
        <Style.Resources>

            <Style TargetType="DatePickerTextBox">
                <Setter Property="Background" Value="Black"/>

            </Style>
        </Style.Resources>
    </Style>



    <!--Combox右侧下拉按钮-->
    <Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <!--下拉按钮内部背景色-->
                    <Border x:Name="Back" Background="White" BorderThickness="1" BorderBrush="Transparent">
                        <!--下拉按钮内边框-->
                        <Path Name="PathFill" Fill="Black"  Width="10" Height="6" StrokeThickness="0" Data="M5,0 L10,10 L0,10 z" RenderTransformOrigin="0.5,0.5" Stretch="Fill">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform Angle="180"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="PathFill" Property="Fill" Value="White"></Setter>
                            <Setter TargetName="Back" Property="Background" Value="Black"></Setter>
                            <Setter TargetName="Back" Property="BorderBrush" Value="Black"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!--Combox-->
    <Style TargetType="ComboBox" x:Key="ComboBoxStyle">
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <!--ComBoxItem-->
                <Style TargetType="ComboBoxItem">
                    <Setter Property="MinHeight" Value="22"></Setter>
                    <Setter Property="MinWidth" Value="60"></Setter>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ComboBoxItem">
                                <Border Name="Back" Background="Transparent"  BorderThickness="0,0,0,0" BorderBrush="Black" >
                                    <ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" ></ContentPresenter>
                                </Border>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
                                    </Trigger>
                                    <!--下拉框背景色-->
                                    <Trigger Property="IsHighlighted" Value="True">
                                        <Setter TargetName="Back" Property="Background" Value="White"></Setter>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBox">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.7*"/>
                            <ColumnDefinition Width="0.3*" MaxWidth="30"/>
                        </Grid.ColumnDefinitions>
                        <!--文字区域背景和边线样式-->
                        <TextBox Background="Black" VerticalAlignment="Center"  Grid.Column="0" Foreground="White" BorderBrush="Black" BorderThickness="0" IsReadOnly="{TemplateBinding IsReadOnly}" Text="{TemplateBinding Text}"></TextBox>
                        <Border  Grid.Column="0" BorderThickness="1" BorderBrush="Black" CornerRadius="1,0,0,1">

                        </Border>
                        <!--右侧下拉button设置-->
                        <Border Grid.Column="1" BorderThickness="0,1,1,1" BorderBrush="Black" CornerRadius="0,1,1,0">
                            <ToggleButton BorderThickness="3" BorderBrush="Black" Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
                        </Border>
                        <!--弹出popup整体设置-->
                        <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide" >
                            <!--弹出popup边框-->
                            <Border CornerRadius="1" BorderBrush="Black" BorderThickness="1,0,1,1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
                                <Border.Effect>
                                    <DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="1"/>
                                </Border.Effect>
                                <!--下拉幕布边界背景设置 MaxHeight="{TemplateBinding MaxDropDownHeight}"-->
                                <ScrollViewer Margin="0,0,0,0"  HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderBrush="Black" BorderThickness="2" >
                                    <!-- StackPanel 用于显示子级，方法是将 IsItemsHost 设置为 True -->
                                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="Black" />
                                </ScrollViewer>
                            </Border>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



    <Style x:Key="TabControlStyle" TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid
                            x:Name="templateRoot"
                            ClipToBounds="true"
                            KeyboardNavigation.TabNavigation="Local"
                            SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0" />
                            <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="RowDefinition0" Height="Auto" />
                            <RowDefinition x:Name="RowDefinition1" Height="*" />
                        </Grid.RowDefinitions>
                        <TabPanel
                                x:Name="headerPanel"
                                Grid.Row="0"
                                Grid.Column="0"               
                                Panel.ZIndex="1"
                                Background="Black"
                               
                                IsItemsHost="true"
                                KeyboardNavigation.TabIndex="1" />
                        <Border
                                x:Name="contentPanel"
                                Grid.Row="1"
                                Grid.Column="0"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                KeyboardNavigation.DirectionalNavigation="Contained"
                                KeyboardNavigation.TabIndex="2"
                                KeyboardNavigation.TabNavigation="Local">
                            <ContentPresenter
                                    x:Name="PART_SelectedContentHost"
                                    ContentSource="SelectedContent"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
                            <Setter TargetName="headerPanel" Property="Margin" Value="2,0,2,2" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="headerPanel" Property="Margin" Value="2,2,0,2" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="headerPanel" Property="Margin" Value="0,2,2,2" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <!--<Setter Property="Tag" Value="115"/>
        <Setter Property="Background" Value="#FFD8E4F4"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>-->
    </Style>


</ResourceDictionary>