具备界面基础功能

This commit is contained in:
2026-01-01 22:40:32 +08:00
parent 0c86b4dad3
commit d039559402
81 changed files with 8333 additions and 1905 deletions

View File

@@ -26,6 +26,19 @@
<Color x:Key="Color.Bg.L3">#2D2D30</Color>
<Color x:Key="Color.Bg.L4">#3E3E42</Color>
<StreamGeometry x:Key="Icon.Action.Time">
M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Action.Reboot">
M12,5V1L7,6L12,11V7A5,5 0 0,1 17,12A5,5 0 0,1 12,17A5,5 0 0,1 7,12H5A7,7 0 0,0 12,19A7,7 0 0,0 19,12A7,7 0 0,0 12,5Z
</StreamGeometry>
<SolidColorBrush x:Key="Brush.State.Info" Color="#3B82F6" />
<SolidColorBrush x:Key="Brush.State.Success" Color="#10B981" />
<SolidColorBrush x:Key="Brush.State.Warning" Color="#FFA940" />
<SolidColorBrush x:Key="Brush.State.Danger" Color="#FF7875" />
<SolidColorBrush x:Key="Brush.Bg.L1" Color="{StaticResource Color.Bg.L1}" />
<SolidColorBrush x:Key="Brush.Bg.L2" Color="{StaticResource Color.Bg.L2}" />
<SolidColorBrush x:Key="Brush.Bg.L3" Color="{StaticResource Color.Bg.L3}" />

View File

@@ -0,0 +1,133 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StreamGeometry x:Key="Icon.Wizard">
M19.14,12.94c0.46-0.45,0.46-1.18,0-1.64l-4.24-4.24c-0.45-0.46-1.18-0.46-1.64,0c-0.46,0.45-0.46,1.18,0,1.64
l1.8,1.8l-9.5,9.5l-2.73-2.73l9.5-9.5l1.8,1.8c0.45,0.46,1.18,0.46,1.64,0c0.46-0.45,0.46-1.18,0-1.64L11.53,3.69
c-0.45-0.46-1.18-0.46-1.64,0s-0.46,1.18,0,1.64l1.8,1.8l-9.5,9.5c-0.63,0.63-0.63,1.65,0,2.28c0.63,0.63,1.65,0.63,2.28,0
l9.5-9.5l1.8,1.8c0.45,0.46,1.18,0.46,1.64,0C17.87,10.74,17.87,10.01,17.41,9.55l-1.8-1.8l1.8-1.8
C17.87,5.5,18.6,5.5,19.06,5.95l1.06,1.06l-1.64,1.64C18.02,9.11,18.02,9.84,18.48,10.3l1.97,1.97
C20.91,12.73,21.64,12.73,22.1,12.27l1.64-1.64l1.06,1.06c0.45,0.46,0.45,1.18,0,1.64l-4.24,4.24
c-0.45,0.46-1.18,0.46-1.64,0c-0.46-0.45-0.46-1.18,0-1.64L19.14,12.94z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Theme">
M12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2C17.5,2 22,6.5 22,12A6,6 0 0,1 16,18C14.9,18 14,17.1 14,16V14.5C14,14.2 13.8,14 13.5,14C13.2,14 13,14.2 13,14.5V16A4,4 0 0,0 17,20C17.6,20 18.1,19.9 18.6,19.7C17.1,21.1 14.8,22 12,22M6.5,10A1.5,1.5 0 0,0 5,11.5A1.5,1.5 0 0,0 6.5,13A1.5,1.5 0 0,0 8,11.5A1.5,1.5 0 0,0 6.5,10M9.5,6A1.5,1.5 0 0,0 8,7.5A1.5,1.5 0 0,0 9.5,9A1.5,1.5 0 0,0 11,7.5A1.5,1.5 0 0,0 9.5,6M14.5,6A1.5,1.5 0 0,0 13,7.5A1.5,1.5 0 0,0 14.5,9A1.5,1.5 0 0,0 16,7.5A1.5,1.5 0 0,0 14.5,6M17.5,10A1.5,1.5 0 0,0 16,11.5A1.5,1.5 0 0,0 17.5,13A1.5,1.5 0 0,0 19,11.5A1.5,1.5 0 0,0 17.5,10Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.ChevronDown">
M7.41,8.59L12,13.17L16.59,8.59L18,10L12,16L6,10L7.41,8.59Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.ChevronUp">
M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Trash">
M9,3L8,4H4V6H20V4H16L15,3H9M18,19A2,2 0 0,1 16,21H8A2,2 0 0,1 6,19V7H18V19M8,9V19H10V9H8M14,9V19H16V9H14Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Pin.Off">
M16,9V19H8V9H16M14.5,3H9.5L8.5,4H5V6H19V4H15.5L14.5,3M18,7H6V19C6,20.1 6.9,21 8,21H16C17.1,21 18,20.1 18,19V7Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Pin.Unfixed">
M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92L14.5,17.77V22H12.9V16.17L10.5,13.77L10.25,14H9.5L5.75,17.75H4.25V16.25L8,12.5V11.75L2,5.75V5.27M16.5,9.75L13,6.25L13.5,5.75L12.5,4.75L11,6.25L6.25,1.5L13.5,1.5L14.5,2.5L15.5,1.5L22.5,8.5L21.5,9.5L22.5,10.5L16.5,9.75Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Pin.Outline">
M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.83,14H15.17L14,12.83V4H10V12.83L8.83,14Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Pin.Fixed">
M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Action.Play">
M8,5.14V19.14L19,12.14L8,5.14Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Action.Pause">
M14,19H18V5H14M6,19H10V5H6V19Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Status.WifiOff">
M23.64,7C23.14,6.6 18.72,3 12,3C5.28,3 0.86,6.6 0.36,7L12,21.5L18.78,13.06C19.81,13.56 20.61,14.47 20.95,15.58L23.64,7M19,16C17.34,16 16,17.34 16,19C16,20.66 17.34,22 19,22C20.66,22 22,20.66 22,19C22,17.34 20.66,16 19,16M19,20C18.45,20 18,19.55 18,19C18,18.45 18.45,18 19,18C19.55,18 20,18.45 20,19C20,19.55 19.55,20 19,20Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Status.Loading">
M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Action.Edit">
M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Refresh">
M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Plus">
M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Ptz">
M12,2L16,6H13V10H17V7L21,11L17,15V12H13V16H16L12,20L8,16H11V12H7V15L3,11L7,7V10H11V6H8L12,2Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Lens.Zoom">
M15.5,14L20.5,19L19,20.5L14,15.5V14.71L13.73,14.43C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.43,13.73L14.71,14H15.5M9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14M12,10H10V12H9V10H7V9H9V7H10V9H12V10Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Lens.Focus">
M6,6H10V4H6A2,2 0 0,0 4,6V10H6V6M14,4V6H18V10H20V6A2,2 0 0,0 18,4H14M18,20H14V18H18V14H20V18A2,2 0 0,0 18,20M6,18H10V20H6A2,2 0 0,0 4,18V14H6V18M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Lens.Iris">
M12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22M12,4A8,8 0 0,0 4,12C4,13.85 4.63,15.55 5.68,16.91L13.67,14.19L16.22,7.62C15.06,5.39 12.77,4 12,4M15.21,17.47L9.7,18.7L7.05,10.61C7.81,13.11 9.92,15.93 12.92,17.18C13.71,17.5 14.47,17.61 15.21,17.47M17.65,15.39L16.79,9.45L8.71,9.08C9.57,6.85 11.75,5.19 14.47,5.03C16.85,4.88 19.16,6.31 20.16,8.5C20.42,9.08 20.59,9.72 20.62,10.39C20.69,11.85 20.18,13.25 19.34,14.39C18.88,15.03 18.28,15.41 17.65,15.39Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Lens.Wiper">
M15,11L9.65,16.35C8.82,17.18 7.5,17.23 6.62,16.5C5.74,15.77 5.74,14.43 6.5,13.5L13.13,5.65C13.88,4.77 15.22,4.72 16.1,5.5C16.97,6.23 16.97,7.57 16.21,8.5L15,11M2.38,17.58C1.21,18.75 1.21,20.65 2.38,21.82C3.55,23 5.45,23 6.62,21.82L13.5,14.94L9.26,10.7L2.38,17.58Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Minus">
M19,13H5V11H19V13Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Focus.Far">
M14,6L10.25,11L13.1,14.8L11.5,16C9.81,13.75 7,10 7,10L1,18H23L14,6Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Focus.Near">
M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M15,12A3,3 0 1,1 12,9A3,3 0 0,1 15,12Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Iris.Small">
M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Iris.Large">
M12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Action.StopSmall">
M6,6H18V18H6V6Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Action.PlaySmall">
M8,5.14V19.14L19,12.14L8,5.14Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Action.Process">
M7.5,5.6L10,7L8.6,4.5L10,2L7.5,3.4L5,2L6.4,4.5L5,7L7.5,5.6M19.5,8L22,9.4L20.6,6.9L22,4.4L19.5,5.8L17,4.4L18.4,6.9L17,9.4L19.5,8M19.5,16L22,17.4L20.6,14.9L22,12.4L19.5,13.8L17,12.4L18.4,14.9L17,17.4L19.5,16M13,5.83L14.88,8.7L18.7,9.5L15.39,12.28L16.27,15.93L13,13.78L9.73,15.93L10.61,12.28L7.3,9.5L11.12,8.7L13,5.83Z
</StreamGeometry>
<StreamGeometry x:Key="Icon.Action.Subscribe">
M6.18,15.64A2.18,2.18 0 0,1 8.36,17.82C8.36,19 7.38,20 6.18,20C5,20 4,19 4,17.82A2.18,2.18 0 0,1 6.18,15.64M4,4.44A15.56,15.56 0 0,1 19.56,20H16.73A12.73,12.73 0 0,0 4,7.27V4.44M4,10.1A9.9,9.9 0 0,1 13.9,20H11.07A7.07,7.07 0 0,0 4,12.93V10.1Z
</StreamGeometry>
<Style x:Key="Style.IconPath" TargetType="Path">
<Setter Property="Stretch" Value="Uniform" />
<Setter Property="Fill" Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Control}}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
</ResourceDictionary>

View File

@@ -1,4 +1,458 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SHH.CameraDashboard">
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<!-- 主界面 - 系统按钮 -->
<Style x:Key="Btn.TitleBar" TargetType="Button">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{StaticResource Brush.Text.Primary}" />
<Setter Property="Width" Value="46" />
<Setter Property="Height" Value="32" />
<Setter Property="Padding" Value="0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ContentPresenter
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True"
SnapsToDevicePixels="False" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource Brush.Bg.Hover}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{StaticResource Brush.Bg.L3}" />
<Setter Property="Opacity" Value="0.8" />
</Trigger>
</Style.Triggers>
</Style>
<!-- 主界面 - 系统按钮 -->
<Style
x:Key="Btn.TitleBar.Close"
BasedOn="{StaticResource Btn.TitleBar}"
TargetType="Button">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource Brush.Status.Danger}" />
<Setter Property="Foreground" Value="{StaticResource Brush.Text.Inverse}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#99F44747" />
<Setter Property="Foreground" Value="{StaticResource Brush.Text.Inverse}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- 按钮颜色 -->
<Style x:Key="Btn.Icon.Base" TargetType="Button">
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="border"
Background="{TemplateBinding Background}"
CornerRadius="4">
<ContentPresenter
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value="0.9" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Opacity" Value="0.7" />
<Setter TargetName="border" Property="RenderTransform">
<Setter.Value>
<ScaleTransform CenterX="16" CenterY="16" ScaleX="0.95" ScaleY="0.95" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#E0E0E0" />
<Setter Property="Foreground" Value="#A0A0A0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="Btn.Icon.Success"
BasedOn="{StaticResource Btn.Icon.Base}"
TargetType="Button">
<Setter Property="Background" Value="{DynamicResource Brush.State.Success}" />
</Style>
<Style
x:Key="Btn.Icon.Danger"
BasedOn="{StaticResource Btn.Icon.Base}"
TargetType="Button">
<Setter Property="Background" Value="{DynamicResource Brush.State.Danger}" />
</Style>
<Style
x:Key="Btn.Icon.Warning"
BasedOn="{StaticResource Btn.Icon.Base}"
TargetType="Button">
<Setter Property="Background" Value="{DynamicResource Brush.State.Warning}" />
</Style>
<Style
x:Key="Btn.Icon.Info"
BasedOn="{StaticResource Btn.Icon.Base}"
TargetType="Button">
<Setter Property="Background" Value="{DynamicResource Brush.State.Info}" />
</Style>
<Style x:Key="Btn.Ghost.Base" TargetType="Button">
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Primary}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="border"
Background="{TemplateBinding Background}"
CornerRadius="4">
<ContentPresenter
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource Brush.Bg.Hover}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Opacity" Value="0.7" />
<Setter TargetName="border" Property="RenderTransform">
<Setter.Value>
<ScaleTransform CenterX="16" CenterY="16" ScaleX="0.95" ScaleY="0.95" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="Btn.Ghost.Secondary"
BasedOn="{StaticResource Btn.Ghost.Base}"
TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Secondary}" />
</Style>
<Style
x:Key="Btn.Ghost.Danger"
BasedOn="{StaticResource Btn.Ghost.Base}"
TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource Brush.State.Danger}" />
</Style>
<Style
x:Key="Btn.Ghost.Info"
BasedOn="{StaticResource Btn.Ghost.Base}"
TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource Brush.State.Info}" />
</Style>
<Style
x:Key="Btn.Ghost.Success"
BasedOn="{StaticResource Btn.Ghost.Base}"
TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource Brush.State.Success}" />
</Style>
<Style x:Key="DangerBtnStyle" TargetType="Button">
<Setter Property="Background" Value="#DC3545" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="10,5" />
<Setter Property="Margin" Value="2" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ContentPresenter
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#C82333" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="#BD2130" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Background" Value="#E2E6EA" />
<Setter Property="Foreground" Value="#6C757D" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- TabItem 样式 -->
<Style x:Key="Style.TabItem.Modern" TargetType="TabItem">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Secondary}" />
<Setter Property="FontSize" Value="13" />
<Setter Property="Padding" Value="16,10" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Grid
x:Name="Root"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<ContentPresenter
x:Name="ContentSite"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
ContentSource="Header"
RecognizesAccessKey="True" />
<Border
x:Name="SelectionUnderline"
Height="2"
VerticalAlignment="Bottom"
Background="{DynamicResource Brush.Brand}"
Visibility="Hidden" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Primary}" />
<Setter TargetName="Root" Property="Background" Value="#1AFFFFFF" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Brand}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter TargetName="SelectionUnderline" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Disable}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 窄边滚动条 -->
<Style TargetType="ScrollBar">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Width" Value="8" />
<Setter Property="MinWidth" Value="8" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Grid Background="Transparent">
<Track x:Name="PART_Track" IsDirectionReversed="true">
<Track.Thumb>
<Thumb>
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Border
Margin="2,0"
Background="{DynamicResource Brush.Text.Disabled}"
CornerRadius="2" />
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value="1" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 滑块样式 -->
<Style x:Key="Style.CheckBox.Switch" TargetType="CheckBox">
<Setter Property="Background" Value="{DynamicResource Brush.Bg.Input}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Primary}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="10,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
x:Name="Track"
Width="44"
Height="24"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
CornerRadius="12">
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
<Grid
Width="44"
Height="24"
HorizontalAlignment="Left">
<Ellipse
x:Name="Knob"
Width="20"
Height="20"
Margin="2,0,0,0"
HorizontalAlignment="Left"
Fill="White"
Stroke="#DDDDDD"
StrokeThickness="0.5">
<Ellipse.Effect>
<DropShadowEffect
BlurRadius="5"
Direction="270"
Opacity="0.3"
ShadowDepth="1.5"
Color="Black" />
</Ellipse.Effect>
<Ellipse.RenderTransform>
<TranslateTransform x:Name="KnobTranslate" X="0" />
</Ellipse.RenderTransform>
</Ellipse>
</Grid>
<ContentPresenter
Grid.Column="1"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="Left"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
TextBlock.Foreground="{TemplateBinding Foreground}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Track" Property="Background" Value="{DynamicResource Brush.State.Success}" />
<Setter TargetName="Track" Property="BorderBrush" Value="{DynamicResource Brush.State.Success}" />
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="KnobTranslate"
Storyboard.TargetProperty="X"
To="20"
Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="KnobTranslate"
Storyboard.TargetProperty="X"
To="0"
Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="Track" Property="BorderBrush" Value="{DynamicResource Brush.Text.Primary}" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button">
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
@@ -105,38 +559,6 @@
</Setter>
</Style>
<Style TargetType="ScrollBar">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Width" Value="10" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Grid Background="Transparent">
<Track x:Name="PART_Track" IsDirectionReversed="true">
<Track.Thumb>
<Thumb>
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Border
Margin="2,0"
Background="{DynamicResource Brush.Text.Disabled}"
CornerRadius="4" />
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ListView">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
@@ -173,17 +595,34 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Style.GridViewHeader.Flat" TargetType="GridViewColumnHeader">
<Style TargetType="DataGrid">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Primary}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="RowHeaderWidth" Value="0" />
<Setter Property="GridLinesVisibility" Value="Horizontal" />
<Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource Brush.Border}" />
<Setter Property="VerticalGridLinesBrush" Value="Transparent" />
<Setter Property="AutoGenerateColumns" Value="False" />
<Setter Property="CanUserAddRows" Value="False" />
<Setter Property="CanUserResizeRows" Value="False" />
<Setter Property="HeadersVisibility" Value="Column" />
<Setter Property="RowHeight" Value="36" />
</Style>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{DynamicResource Brush.Bg.Header}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Secondary}" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="Height" Value="40" />
<Setter Property="BorderThickness" Value="0,0,0,1" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource Brush.Bg.Panel}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Secondary}" />
<Setter Property="Padding" Value="10,8" />
<Setter Property="BorderThickness" Value="0,0,1,1" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewColumnHeader">
<ControlTemplate TargetType="DataGridColumnHeader">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
@@ -197,45 +636,144 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Style.ListViewItem.Table" TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="10,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<Border Background="Transparent" BorderThickness="0">
<ContentPresenter Margin="{TemplateBinding Padding}" VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Brand}" />
<Setter Property="FontWeight" Value="Bold" />
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="DataGridRow">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource Brush.Bg.Hover}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource Brush.Bg.Selected}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="PrimaryBtnStyle" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource Brush.Brand}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Inverse}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="15,6" />
<Setter Property="Height" Value="32" />
<Setter Property="FontSize" Value="13" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ContentPresenter
Margin="{TemplateBinding Padding}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Opacity" Value="0.9" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Opacity" Value="0.8" />
<Setter TargetName="border" Property="RenderTransform">
<Setter.Value>
<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="0.98" ScaleY="0.98" />
</Setter.Value>
</Setter>
<Setter TargetName="border" Property="RenderTransformOrigin" Value="0.5,0.5" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Background" Value="{DynamicResource Brush.Bg.L4}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Disabled}" />
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Style.GridViewHeader.Flat" TargetType="GridViewColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Secondary}" />
<Setter Property="Background" Value="{DynamicResource Brush.Bg.Panel}" />
<Setter Property="Padding" Value="10,8" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewColumnHeader">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource Brush.Border}"
BorderThickness="0,0,0,1">
<ContentPresenter
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Style.ListViewItem.Table" TargetType="ListViewItem">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text.Primary}" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="5,0" />
<Setter Property="Margin" Value="0" />
<Setter Property="BorderThickness" Value="0,0,0,1" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
<Setter Property="MinHeight" Value="35" />
<Setter Property="BorderBrush" Value="#1AFFFFFF" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border
x:Name="Bd"
Padding="4,0"
Height="30"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Rectangle
x:Name="AccentBar"
Width="3"
Margin="-4,0,0,0"
HorizontalAlignment="Left"
Fill="{DynamicResource Brush.Accent}"
Visibility="Collapsed" />
<GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Grid>
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true">
<GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Bg.Hover}" />
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Bd" Property="Background" Value="#1AFFFFFF" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Bg.L4}" />
<Setter TargetName="AccentBar" Property="Visibility" Value="Visible" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="SemiBold" />
<Trigger Property="IsSelected" Value="true">
<Setter TargetName="Bd" Property="Background" Value="#33007ACC" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Brand}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -252,7 +790,7 @@
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="8,4" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Height" Value="30" />
<Setter Property="Height" Value="36" />
</Style>
<Style x:Key="Style.TextBox.CodeEditor" TargetType="TextBox">