113 lines
6.2 KiB
XML
113 lines
6.2 KiB
XML
<Application x:Class="henlo_migration.App"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:henlo_migration.ViewModels"
|
|
xmlns:b="clr-namespace:henlo_migration.Behaviors"
|
|
xmlns:converters="clr-namespace:henlo_migration.Converters"
|
|
StartupUri="Views/HomeWindow.xaml">
|
|
<Application.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
|
|
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<vm:MainViewModel x:Key="MainVM"/>
|
|
<BooleanToVisibilityConverter x:Key="Boolean2VisibilityConverter"/>
|
|
<converters:ReadStatusColorConverter x:Key="ReadStatusColorConverter"/>
|
|
<converters:WriteStatusColorConverter x:Key="WriteStatusColorConverter"/>
|
|
<Style x:Key="CopyableName" TargetType="TextBlock">
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="4,0"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Foreground" Value="#0969da"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="TextDecorations" Value="Underline"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<!-- 单个状态图标:圆角矩形徽章,高度24 -->
|
|
<Style x:Key="StatusBadge" TargetType="Border">
|
|
<Setter Property="CornerRadius" Value="3"/>
|
|
<Setter Property="Padding" Value="6,0"/>
|
|
<Setter Property="Height" Value="24"/>
|
|
<Setter Property="MinHeight" Value="24"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
</Style>
|
|
<!-- 状态图标内文字 -->
|
|
<Style x:Key="StatusBadgeText" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontSize" Value="11"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style x:Key="SmallBtn" TargetType="Button" BasedOn="{StaticResource ButtonPrimary}">
|
|
<Setter Property="Padding" Value="10,4"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="MinWidth" Value="50"/>
|
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
</Style>
|
|
<Style x:Key="SmallSuccessBtn" TargetType="Button" BasedOn="{StaticResource ButtonSuccess}">
|
|
<Setter Property="Padding" Value="10,4"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="MinWidth" Value="50"/>
|
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
</Style>
|
|
<Style x:Key="SmallWarnBtn" TargetType="Button" BasedOn="{StaticResource ButtonWarning}">
|
|
<Setter Property="Padding" Value="10,4"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="MinWidth" Value="50"/>
|
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
</Style>
|
|
<Style x:Key="SmallDefaultBtn" TargetType="Button" BasedOn="{StaticResource ButtonDefault}">
|
|
<Setter Property="Padding" Value="10,4"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="MinWidth" Value="50"/>
|
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
</Style>
|
|
|
|
<!-- 全局覆盖 DataGridRowStyle:选中行始终蓝底白字,失焦不变成灰 -->
|
|
<Style x:Key="DataGridRowStyleFix" TargetType="DataGridRow">
|
|
<Setter Property="Background" Value="White"/>
|
|
<Setter Property="BorderBrush" Value="#e1e4e8"/>
|
|
<Setter Property="BorderThickness" Value="0,0,0,1"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="#0969da"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#f6f8fa"/>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True"/>
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
</MultiTrigger.Conditions>
|
|
<MultiTrigger.Setters>
|
|
<Setter Property="Background" Value="#0860ca"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</MultiTrigger.Setters>
|
|
</MultiTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- ReadStatusBadge 已废弃,由 StatusBadge + StatusBadgeText 替代 -->
|
|
<!-- 全局覆盖 DataGridCellStyle:去除选中单元格的高亮边框 -->
|
|
<Style x:Key="DataGridCellStyleFix" TargetType="DataGridCell">
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Padding" Value="4,6"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="#24292e"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</Application.Resources>
|
|
</Application>
|