<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:pu="https://opensource.panuon.com/wpf-ui">

    <Style TargetType="ToolTip">
        <Setter Property="Background" Value="#141332"/>
        <Setter Property="BorderBrush" Value="#3B3B7B"/>
        <Setter Property="Foreground" Value="LightGray"/>
    </Style>
    <DropShadowEffect x:Key="DropShadow"
           Color="LightGray"
           ShadowDepth="2"
           BlurRadius="20"
           Opacity="0.5" />
    <Style x:Key="{ComponentResourceKey ResourceId=NoticeBoxItemStyle, TypeInTargetAssembly={x:Type pu:NoticeBox}}"
           TargetType="pu:NoticeBoxItem">
        <Setter Property="pu:IconHelper.FontFamily" Value="微软雅黑" />
        <Setter Property="pu:IconHelper.FontSize" Value="16" />
        <Setter Property="FontFamily" Value="微软雅黑" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Width" Value="350" />
        <Setter Property="Height" Value="150" />
        <Setter Property="ClickEffect" Value="Sink" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    </Style>
    <Style TargetType="ScrollViewer">
        <Setter Property="pu:ScrollBarHelper.ThumbBackground" Value="#55736AFA"/>
        <Setter Property="pu:ScrollBarHelper.ThumbCornerRadius" Value="4"/>
        <Setter Property="pu:ScrollBarHelper.HoverThumbBackground" Value="#88736AFA"/>
    </Style>

    <Style TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="#FFFFFF"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="CanUserSortColumns" Value="True"/>
        <Setter Property="MinRowHeight" Value="45"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="CanUserAddRows" Value="False" />
        <Setter Property="CanUserDeleteRows" Value="False" />
        <Setter Property="AutoGenerateColumns" Value="False" />
        <Setter Property="HorizontalGridLinesBrush" Value="Transparent" />
        <Setter Property="VerticalGridLinesBrush" Value="Transparent" />
        <Setter Property="GridLinesVisibility" Value="None"/>
        <Setter Property="pu:DataGridHelper.ColumnHeaderBackground" Value="#34346A"/>
        <Setter Property="pu:DataGridHelper.ColumnHeaderPanelBackground" Value="#34346A"/>
        <Setter Property="pu:DataGridHelper.ColumnHeaderPanelSeparatorVisibility" Value="Hidden"/>
        <Setter Property="pu:DataGridHelper.ColumnHeaderHoverBackground" Value="#34346A"/>
        <Setter Property="pu:DataGridHelper.ColumnHeaderClickBackground" Value="#34346A"/>
        <Setter Property="pu:DataGridHelper.ColumnHeaderPanelCornerRadius" Value="10,10,0,0"/>
        <Setter Property="pu:DataGridHelper.RowHeaderBackground" Value="Transparent"/>
        <Setter Property="pu:ScrollBarHelper.ThumbBackground" Value="#55736AFA"/>
        <Setter Property="pu:ScrollBarHelper.ThumbCornerRadius" Value="4"/>
        <Setter Property="pu:ScrollBarHelper.HoverThumbBackground" Value="#88736AFA"/>
        
    </Style>
    <Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
        <Setter Property="SnapsToDevicePixels" Value="False" />
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="#97A6D4" />
        <Setter Property="FontWeight" Value="Medium" />
        <Setter Property="Padding" Value="15,0"/>
        <Setter Property="Height" Value="70"/>
    </Style>
    <Style TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
        <Setter Property="BorderBrush" Value="#3B3B7B"/>
        <Setter Property="Background" Value="#202045"/>
        <Setter Property="Foreground" Value="#7886B2"/>
        <Setter Property="pu:ComboBoxHelper.CornerRadius" Value="5"/>
        <Setter Property="Padding" Value="10,0"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="Width" Value="200"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="MaxDropDownHeight" Value="500"/>
        <Setter Property="BorderThickness" Value="2,2,2,2"/>
        <Setter Property="pu:ComboBoxHelper.WatermarkForeground" Value="#7886B2"/>
        <Setter Property="pu:ComboBoxHelper.ItemsSelectedBackground" Value="#34346A"/>
        <Setter Property="pu:ComboBoxHelper.ItemsHoverBackground" Value="#7334346A"/>
        <Setter Property="pu:ComboBoxHelper.HoverBorderBrush" Value="#6158E5"/>
        <Setter Property="pu:ComboBoxHelper.HoverForeground" Value="#FFFFFF"/>
        <Setter Property="pu:ComboBoxHelper.FocusedForeground" Value="#FFFFFF"/>
        <Setter Property="pu:ComboBoxHelper.ItemsSelectedForeground" Value="#FFFFFF"/>
    </Style>
    <Style TargetType="pu:DateTimePicker" BasedOn="{StaticResource {x:Type pu:DateTimePicker}}">
        <Setter Property="Padding" Value="15,0"/>
        <Setter Property="Background" Value="#141332"/>
        <Setter Property="BorderBrush" Value="#3B3B7B"/>
        <Setter Property="CornerRadius" Value="5"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="Width" Value="280"/>
        <Setter Property="FontFamily" Value="{StaticResource PuHuiTiRegular}"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="FirstDayOfWeek" Value="Monday"/>
        <Setter Property="TextStringFormat" Value="yyyy/MM/dd HH:mm:ss"/>
        <Setter Property="Mode" Value="DateTime"/>
        <Setter Property="Foreground" Value="#7886B2"/>
        <Setter Property="BorderThickness" Value="2,2,2,2"/>
        <Setter Property="WatermarkForeground" Value="#7886B2"/>
        <Setter Property="ItemsCheckedForeground" Value="#FFFFFF"/>
        <Setter Property="ItemsCheckedBackground" Value="#615CDD"/>
        <Setter Property="ItemsHoverBackground" Value="#77615CDD"/>
        <Setter Property="ItemsHoverForeground" Value="#FFFFFF"/>
        <Setter Property="ItemsForeground" Value="#7886B2"/>
        <Setter Property="ItemsCheckedCornerRadius" Value="5"/>
        <Setter Property="ItemsHoverCornerRadius" Value="5"/>
        <Setter Property="pu:IconHelper.ToggleArrowFontSize" Value="18"/>
        <Setter Property="FontStretch" Value="Condensed"/>
        <Setter Property="HoverForeground" Value="#FFFFFF"/>
        <Setter Property="HoverBorderBrush" Value="#6158E5"/>
        <Setter Property="FocusedForeground" Value="#FFFFFF"/>
    </Style>
    <Style TargetType="PasswordBox" BasedOn="{StaticResource {x:Type PasswordBox}}">
        <Setter Property="Height" Value="30"/>
        <Setter Property="BorderBrush" Value="#FFC9CCD4"/>
        <Setter Property="pu:PasswordBoxHelper.CornerRadius" Value="5"/>
        <Setter Property="pu:TextBoxHelper.FocusedShadowColor" Value="#FFDEE8F8"/>
        <Setter Property="pu:PasswordBoxHelper.WatermarkForeground" Value="#CCCCCC"/>
    </Style>
    <Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
        <Setter Property="Height" Value="40"/>
        <Setter Property="Width" Value="150"/>
        <Setter Property="Background" Value="#202045"/>
        <Setter Property="BorderBrush" Value="#3B3B7B"/>
        <Setter Property="BorderThickness" Value="2,2,2,2"/>
        <Setter Property="Foreground" Value="#FFFFFF"/>
        <Setter Property="Padding" Value="6"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="pu:TextBoxHelper.CornerRadius" Value="5"/>
        <Setter Property="pu:TextBoxHelper.HoverBorderBrush" Value="#6158E5"/>
    </Style>
    <Style TargetType="pu:NumberInput" BasedOn="{StaticResource {x:Type pu:NumberInput}}">
        <Setter Property="Height" Value="30"/>
        <Setter Property="BorderBrush" Value="#FFC9CCD4"/>
        <Setter Property="pu:NumberInput.CornerRadius" Value="5"/>
        <Setter Property="pu:NumberInput.FocusedShadowColor" Value="#FFDEE8F8"/>
        <Setter Property="pu:NumberInput.WatermarkForeground" Value="#CCCCCC"/>
        <Setter Property="pu:NumberInput.HoverBorderBrush" Value="#6158E5"/>
    </Style>
    <Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
        <Setter Property="Foreground" Value="#7886B2"/>
        <Setter Property="BorderBrush" Value="#7886B2"/>
        <Setter Property="BorderThickness" Value="1.6"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="pu:CheckBoxHelper.CheckedGlyphBrush" Value="Green"/>
        <Setter Property="pu:CheckBoxHelper.CheckedBorderThickness" Value="1.6"/>
        <Setter Property="pu:CheckBoxHelper.GlyphThickness" Value="1.6"/>
        <Setter Property="pu:CheckBoxHelper.CornerRadius" Value="2"/>
    </Style>
    <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="pu:ButtonHelper.CornerRadius" Value="15"/>
        <Setter Property="Foreground" Value="#FFFFFF"/>
        <Setter Property="FontSize" Value="20"/>
        <Setter Property="Width" Value="100"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                    <GradientStop Color="#4E38F0" Offset="0.6"/>
                    <GradientStop Color="#736AFA" Offset="1.2"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CancelButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="pu:ButtonHelper.CornerRadius" Value="15"/>
        <Setter Property="Foreground" Value="#FFFFFF"/>
        <Setter Property="Width" Value="120"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Height" Value="60"/>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                    <GradientStop Color="#615E7C" Offset="0.6"/>
                    <GradientStop Color="#807E9F" Offset="1.2"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BoxRadioButton" TargetType="{x:Type RadioButton}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="#363636"/>
        <Setter Property="Padding" Value="3 2 3 2"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="Height" Value="32"/>
        <Setter Property="Width" Value="110"/>
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="BorderBrush" Value="#C9CCD4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <Grid x:Name="grid" VerticalAlignment="Center">
                        <Border BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Height="{TemplateBinding Height}"
                                HorizontalAlignment="Center"
                                Background="{TemplateBinding Background}" Width="{TemplateBinding Width}" CornerRadius="5,5,0,5">
                            <ContentPresenter VerticalAlignment="Center"
                                              HorizontalAlignment="Center"
                                              Margin="{TemplateBinding Padding}"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                        <!--选中的状态标识-->
                        <TextBlock Text="&#xe9eb;"
                                   x:Name="checkState"
                                   FontFamily="{StaticResource PanuonIconFont }"
                                   VerticalAlignment="Bottom" Visibility="Collapsed"
                                   FontSize="16" Margin="3,0,0,3" HorizontalAlignment="Right" Foreground="#017DE6"/>
                    </Grid>
                    <!--触发器：设置选中状态符号-->
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Visibility" Value="Visible" TargetName="checkState" ></Setter>
                            <Setter Property="BorderBrush" Value="#017DE6"></Setter>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="#BD017DE6"></Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.5" TargetName="grid" ></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
        <Setter Property="Background" Value="Transparent"/>
    </Style>
    <Style TargetType="{x:Type pu:Carousel}" BasedOn="{StaticResource {x:Type pu:Carousel}}">
        <Setter Property="IsCyclic" Value="True"/>
        <Setter Property="pu:Carousel.IndicatorVisibility" Value="Collapsed"/>
        <Setter Property="pu:Carousel.PageTurnButtonVisibility" Value="Collapsed"/>
    </Style>
    <Style TargetType="TabControl" BasedOn="{StaticResource {x:Type TabControl}}">
        <Setter Property="pu:TabControlHelper.HeaderPanelAlignment" Value="Center" />
        <Setter Property="pu:TabControlHelper.ItemsHeight" Value="45"/>
        <Setter Property="pu:TabControlHelper.ItemsPadding" Value="15,0"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="pu:TabControlHelper.ItemsHoverBackground" Value="{x:Null}"/>
        <Setter Property="pu:TabControlHelper.ItemsRibbonLineVisibility" Value="Visible"/>
        <Setter Property="pu:TabControlHelper.ItemsRibbonLinePlacement" Value="Bottom"/>
        <Setter Property="pu:TabControlHelper.ItemsRibbonLineBrush" Value="Transparent"/>
        <Setter Property="pu:TabControlHelper.ItemsHoverRibbonLineBrush" Value="#C62F2F"/>
        <Setter Property="pu:TabControlHelper.ItemsHoverRibbonLineThickness" Value="1"/>
        <Setter Property="pu:TabControlHelper.ItemsSelectedRibbonLineBrush" Value="#C62F2F"/>
        <Setter Property="pu:TabControlHelper.ItemsSelectedRibbonLineThickness" Value="3"/>
        <Setter Property="pu:TabControlHelper.ItemsSelectedBackground" Value="{x:Null}"/>
        <Setter Property="pu:TabControlHelper.HeaderPanelBorderBrush" Value="LightGray"/>
        <Setter Property="pu:TabControlHelper.HeaderPanelBorderThickness" Value="0,0,0,1"/>
    </Style>
    <Style TargetType="ProgressBar" BasedOn="{StaticResource {x:Type ProgressBar}}">
        <Setter Property="Minimum" Value="0" />
        <Setter Property="Maximum" Value="100" />
        <Setter Property="Height" Value="14" />
        <Setter Property="pu:ProgressBarHelper.CornerRadius" Value="7" />
        <Setter Property="pu:ProgressBarHelper.InvertedForeground" Value="#F1F1F1" />
        <Setter Property="pu:ProgressBarHelper.IsPercentVisible" Value="True" />
        <Setter Property="pu:ShadowHelper.ShadowDepth" Value="5" />
        <Setter Property="pu:ShadowHelper.BlurRadius" Value="15" />
    </Style>
    <Style TargetType="pu:Pagination">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Height" Value="30" />
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Foreground" Value="#000000" />
        <Setter Property="ItemsBackground" Value="Transparent" />
        <Setter Property="ItemsCornerRadius" Value="5" />
        <Setter Property="ItemsSelectedBackground" Value="#017DE6" />
        <Setter Property="ItemsSelectedForeground" Value="#FFFFFF" />
        <Setter Property="ItemsHoverBackground" Value="LightGray" />
        <Setter Property="ItemsHoverForeground" Value="#000000" />
        <Setter Property="ItemsMargin" Value="6,0"/>
        <Setter Property="PageTurnButtonStyle">
            <Setter.Value>
                <Style TargetType="RepeatButton" BasedOn="{StaticResource {x:Static pu:Pagination.PageTurnButtonStyleKey}}">
                    <Setter Property="Background" Value="Transparent" />
                    <Setter Property="pu:RepeatButtonHelper.CornerRadius"  Value="5" />
                    <Setter Property="Foreground" Value="#000000" />
                    <Setter Property="FontWeight" Value="Bold" />
                    <Setter Property="pu:RepeatButtonHelper.HoverBackground" Value="LightGray" />
                    <Setter Property="pu:RepeatButtonHelper.HoverForeground" Value="#000000" />
                </Style>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ToggleButton}}">
        <Setter Property="Background" Value="#141332"/>
        <Setter Property="BorderBrush" Value="#3B3B7B"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="Foreground" Value="#615CDD"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="Width" Value="95"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="pu:ToggleButtonHelper.CornerRadius" Value="5"/>
        <Setter Property="pu:ToggleButtonHelper.HoverBackground" Value="#88615CDD"/>
        <Setter Property="pu:ToggleButtonHelper.HoverForeground" Value="#88FFFFFF"/>
        <Setter Property="pu:ToggleButtonHelper.HoverBorderBrush" Value="#6158E5"/>
        <Setter Property="pu:ToggleButtonHelper.CheckedBackground" Value="#615CDD"/>
        <Setter Property="pu:ToggleButtonHelper.CheckedForeground" Value="#FFFFFF"/>
        <Setter Property="pu:ToggleButtonHelper.CheckedBorderThickness" Value="0"/>
    </Style>
    <Style TargetType="TextBlock" x:Key="HeartbeatTextBlockStyle">
        <Setter Property="Text" Value="&#xE955;"/>
        <Setter Property="FontFamily" Value="{StaticResource PanuonIconFont}"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="1" ScaleY="1"/>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsHeartbeatReceived}" Value="True">
                <DataTrigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <!-- 心跳动画序列 -->
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform.ScaleX">
                                <!-- 第一次强跳动 -->
                                <LinearDoubleKeyFrame KeyTime="0:0:0.0" Value="1"/>
                                <LinearDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                                <LinearDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                                <!-- 第二次弱跳动 -->
                                <LinearDoubleKeyFrame KeyTime="0:0:0.4" Value="1.15"/>
                                <LinearDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform.ScaleY">
                                <!-- 第一次强跳动 -->
                                <LinearDoubleKeyFrame KeyTime="0:0:0.0" Value="1"/>
                                <LinearDoubleKeyFrame KeyTime="0:0:0.15" Value="1.3"/>
                                <LinearDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                                <!-- 第二次弱跳动 -->
                                <LinearDoubleKeyFrame KeyTime="0:0:0.4" Value="1.15"/>
                                <LinearDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <!-- 颜色动画 - 心跳红色效果 -->
                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground.Color">
                                <DiscreteColorKeyFrame KeyTime="0:0:0.0" Value="#7F74FF"/>
                                <!-- 第一次跳动 - 深红色 -->
                                <LinearColorKeyFrame KeyTime="0:0:0.08" Value="#C62F2F"/>
                                <LinearColorKeyFrame KeyTime="0:0:0.2" Value="#C62F2F"/>
                                <!-- 快速回到原色 -->
                                <LinearColorKeyFrame KeyTime="0:0:0.28" Value="#7F74FF"/>
                                <!-- 第二次跳动 - 浅红色 -->
                                <LinearColorKeyFrame KeyTime="0:0:0.33" Value="#C62F2F"/>
                                <LinearColorKeyFrame KeyTime="0:0:0.4" Value="#C62F2F"/>
                                <!-- 最终回到原色 -->
                                <LinearColorKeyFrame KeyTime="0:0:0.5" Value="#7F74FF"/>
                            </ColorAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.EnterActions>
            </DataTrigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>