增加UI库 暂未改完
This commit is contained in:
1 parent
446224f4cf
commit
993a91a545
7 files changed
+894
-66
No files matched your search
@@ -20,6 +20,11 @@
|
||||
<converters:ListBoxIndexConverter x:Key="listBoxIndexConverter" />
|
||||
<converters:FlagColorConverter x:Key="flagColorConverter" />
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/WxOrder.Framework;component/Resources/SkinLocal.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
|
||||
|
||||
|
||||
<ResourceDictionary Source="Styles/BaseWindowStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseDataGridStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseButtonStyle.xaml" />
|
||||
|
||||
@@ -1,71 +1,163 @@
|
||||
<basewindows:BaseWindow x:Class="_29WxOrderWpf.Windows.LoginWindows.LoginWindow" xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.Windows.LoginWindows"
|
||||
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
mc:Ignorable="d" Style="{StaticResource BaseNoneBorderWindowStyle}"
|
||||
x:Name="loginWindow" Title="登录" Height="300" Width="400" ResizeMode="NoResize" Loaded="loginWindow_Loaded" Closing="BaseWindow_Closing">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="120"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Background="{StaticResource mainLinearColorBrush}"></Border>
|
||||
<Grid Grid.Row="1" Margin="2,0,2,2" Background="White">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition Width="180"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="20"></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="20"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="1" BorderBrush="{StaticResource mainColorBrush}" BorderThickness="1" CornerRadius="4" Height="26">
|
||||
<Grid>
|
||||
<ComboBox x:Name="cmbUserNameMobile" Margin="3,0" VerticalContentAlignment="Center" Style="{StaticResource BaseComboBoxStyle}"
|
||||
SelectionChanged="cmbUserNameMobile_SelectionChanged">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!--<Grid HorizontalAlignment="Stretch" Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ComboBox}, Path=Width}">
|
||||
<basewindows:BaseWindow
|
||||
x:Class="_29WxOrderWpf.Windows.LoginWindows.LoginWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.Windows.LoginWindows"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
x:Name="loginWindow"
|
||||
Title="登录"
|
||||
Width="400"
|
||||
Height="300"
|
||||
Closing="BaseWindow_Closing"
|
||||
Loaded="loginWindow_Loaded"
|
||||
ResizeMode="NoResize"
|
||||
Style="{StaticResource BaseNoneBorderWindowStyle}"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="120" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Background="{StaticResource mainLinearColorBrush}" />
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
Margin="2,0,2,2"
|
||||
Background="White">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="20" />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="20" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Height="26"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4">
|
||||
<Grid>
|
||||
<ComboBox
|
||||
x:Name="cmbUserNameMobile"
|
||||
Margin="3,0"
|
||||
VerticalContentAlignment="Center"
|
||||
SelectionChanged="cmbUserNameMobile_SelectionChanged"
|
||||
Style="{StaticResource BaseComboBoxStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!--<Grid HorizontalAlignment="Stretch" Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ComboBox}, Path=Width}">
|
||||
<TextBlock Text="{Binding}"/>
|
||||
<Button x:Name="btnDeleteItem" HorizontalAlignment="Right" Content="X" Click="btnDeleteItem_Click"/>
|
||||
</Grid>-->
|
||||
<Grid HorizontalAlignment="Stretch" Width="140">
|
||||
<TextBlock x:Name="txtName" Text="{Binding}" Padding="0" VerticalAlignment="Center"/>
|
||||
<userctrls:UcImageButton Width="17" Height="17" ButtonImage="{StaticResource imgCloseGray}" BorderThickness="0" Cursor="Hand"
|
||||
MouseOverButtonImage="{StaticResource imgCloseGray}" MousePressButtonImage="{StaticResource imgCloseGray}" Background="Transparent"
|
||||
x:Name="btnDeleteItem" Tag="{Binding ElementName=txtName, Path=Text}" HorizontalAlignment="Right" Click="btnDeleteItem_Click"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border Grid.Row="2" BorderBrush="{StaticResource mainColorBrush}" BorderThickness="1" CornerRadius="4" Height="26">
|
||||
<PasswordBox x:Name="txtPassword" Margin="6,0" VerticalContentAlignment="Center" Style="{StaticResource BasePasswordBoxStyle}"></PasswordBox>
|
||||
</Border>
|
||||
<CheckBox Content="记住密码" x:Name="chkRemember" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left" Grid.Row="3" VerticalAlignment="Center" Checked="chkRemember_Checked"/>
|
||||
<Button x:Name="btnLogin" Style="{StaticResource BaseButtonStyle}" Grid.Row="4" Content="安 全 登 录" Height="26" Click="btnLogin_Click"></Button>
|
||||
<CheckBox Content="调试模式" Height="24" Visibility="Collapsed" x:Name="chkDebug" BorderBrush="{StaticResource mainColorBrush}"
|
||||
FontSize="12" VerticalContentAlignment="Center" HorizontalAlignment="Left" Grid.Row="5" VerticalAlignment="Center" Checked="chkDebug_Checked" Unchecked="chkDebug_Checked"/>
|
||||
<Grid Width="140" HorizontalAlignment="Stretch">
|
||||
<TextBlock
|
||||
x:Name="txtName"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding}" />
|
||||
<userctrls:UcImageButton
|
||||
x:Name="btnDeleteItem"
|
||||
Width="17"
|
||||
Height="17"
|
||||
HorizontalAlignment="Right"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ButtonImage="{StaticResource imgCloseGray}"
|
||||
Click="btnDeleteItem_Click"
|
||||
Cursor="Hand"
|
||||
MouseOverButtonImage="{StaticResource imgCloseGray}"
|
||||
MousePressButtonImage="{StaticResource imgCloseGray}"
|
||||
Tag="{Binding ElementName=txtName, Path=Text}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Height="26"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4">
|
||||
<PasswordBox
|
||||
x:Name="txtPassword"
|
||||
Margin="6,0"
|
||||
VerticalContentAlignment="Center"
|
||||
Style="{StaticResource BasePasswordBoxStyle}" />
|
||||
</Border>
|
||||
<CheckBox
|
||||
x:Name="chkRemember"
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Checked="chkRemember_Checked"
|
||||
Content="记住密码"
|
||||
FontSize="12" />
|
||||
<Button
|
||||
x:Name="btnLogin"
|
||||
Grid.Row="4"
|
||||
Height="26"
|
||||
Click="btnLogin_Click"
|
||||
Content="安 全 登 录"
|
||||
Style="{StaticResource BaseButtonStyle}" />
|
||||
<CheckBox
|
||||
x:Name="chkDebug"
|
||||
Grid.Row="5"
|
||||
Height="24"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Checked="chkDebug_Checked"
|
||||
Content="调试模式"
|
||||
FontSize="12"
|
||||
Unchecked="chkDebug_Checked"
|
||||
Visibility="Collapsed" />
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Image Source="{StaticResource main29WeixinIcon}" Height="24" Width="24" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="4"></Image>
|
||||
<Label x:Name="lblAppName" FontSize="28" Margin="0,14,0,0" Foreground="{StaticResource mainColorLightBrush}" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Content="拍单软件"></Label>
|
||||
<Label x:Name="lblTitle" Margin="30,2" Foreground="White" Content="{Binding ElementName=loginWindow, Path=Title}"></Label>
|
||||
<userctrls:UcWindowBoxes VerticalAlignment="Top" HorizontalAlignment="Right" Margin="4" MaxBoxVisibility="Collapsed" MinBoxVisibility="Collapsed"/>
|
||||
|
||||
</Grid>
|
||||
<Image
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="4"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Source="{StaticResource main29WeixinIcon}" />
|
||||
<Label
|
||||
x:Name="lblAppName"
|
||||
Margin="0,14,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
Content="拍单软件"
|
||||
FontSize="28"
|
||||
Foreground="{StaticResource mainColorLightBrush}"
|
||||
Style="{x:Null}" />
|
||||
<Label
|
||||
x:Name="lblTitle"
|
||||
Margin="30,2"
|
||||
Content="{Binding ElementName=loginWindow, Path=Title}"
|
||||
Foreground="White" />
|
||||
<userctrls:UcWindowBoxes
|
||||
Margin="4"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
MaxBoxVisibility="Collapsed"
|
||||
MinBoxVisibility="Collapsed" />
|
||||
|
||||
</Grid>
|
||||
</basewindows:BaseWindow>
|
||||
@@ -0,0 +1,111 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- 主色调:改为当前使用的紫色系(原 mainColorBrush / mainColorLightBrush / mainColorDarkBrush) -->
|
||||
<Color x:Key="LightPrimaryColor">#F5EBFF</Color>
|
||||
<Color x:Key="PrimaryColor">#98638F</Color>
|
||||
<Color x:Key="DarkPrimaryColor">#6B5393</Color>
|
||||
|
||||
<!-- 危险色:改为当前使用的红色(原 PageWarningBrush / FlagRedBrush) -->
|
||||
<Color x:Key="LightDangerColor">#fff6f7</Color>
|
||||
<Color x:Key="DangerColor">#FA4733</Color>
|
||||
<Color x:Key="DarkDangerColor">#FA4733</Color>
|
||||
|
||||
<!-- 警告色:改为当前使用的橙色(原 FlagOrangeBrush) -->
|
||||
<Color x:Key="LightWarningColor">#fffcf5</Color>
|
||||
<Color x:Key="WarningColor">#FAB533</Color>
|
||||
<Color x:Key="DarkWarningColor">#FAB533</Color>
|
||||
|
||||
<!-- 信息色:改为当前使用的蓝色(原 PageLinkBrush / FlagBlueBrush,也是原模板的主色蓝) -->
|
||||
<Color x:Key="LightInfoColor">#f1fdff</Color>
|
||||
<Color x:Key="InfoColor">#409EFF</Color>
|
||||
<Color x:Key="DarkInfoColor">#409EFF</Color>
|
||||
|
||||
<Color x:Key="LightSuccessColor">#f3fff6</Color>
|
||||
<Color x:Key="SuccessColor">#67C23A</Color>
|
||||
<Color x:Key="DarkSuccessColor">#67C23A</Color>
|
||||
|
||||
<Color x:Key="PrimaryTextColor">#303133</Color>
|
||||
<Color x:Key="SecondaryTextColor">#909399</Color>
|
||||
<Color x:Key="ThirdlyTextColor">#bdbdbd</Color>
|
||||
<Color x:Key="ReverseTextColor">#606266</Color>
|
||||
<Color x:Key="TextIconColor">White</Color>
|
||||
|
||||
<Color x:Key="BorderColor">#e0e0e0</Color>
|
||||
<Color x:Key="SecondaryBorderColor">#909399</Color>
|
||||
<Color x:Key="BackgroundColor">#eeeeee</Color>
|
||||
<Color x:Key="RegionColor">#ffffff</Color>
|
||||
<Color x:Key="SecondaryRegionColor">#eeeeee</Color>
|
||||
<Color x:Key="ThirdlyRegionColor">White</Color>
|
||||
<!-- 标题色跟随新的主色调(紫色) -->
|
||||
<Color x:Key="TitleColor">#98638F</Color>
|
||||
<Color x:Key="SecondaryTitleColor">#98638F</Color>
|
||||
|
||||
<Color x:Key="DefaultColor">White</Color>
|
||||
<Color x:Key="DarkDefaultColor">#f5f5f5</Color>
|
||||
|
||||
<Color x:Key="AccentColor">#f8491e</Color>
|
||||
<Color x:Key="DarkAccentColor">#f8491e</Color>
|
||||
|
||||
<Color x:Key="DarkMaskColor">#20000000</Color>
|
||||
<Color x:Key="DarkOpacityColor">#40000000</Color>
|
||||
|
||||
<SolidColorBrush x:Key="TreeViewItemSelectedBrush" Color="#ACD1F8" />
|
||||
<SolidColorBrush x:Key="TreeViewItemSelectedBrush2" Color="#738BA3" />
|
||||
|
||||
<Color x:Key="BackgrondColor1">#e9e9e9</Color>
|
||||
<Color x:Key="BackgrondColor2">#d3d3d3</Color>
|
||||
<Color x:Key="BackgrondColor3">#c2c2c2</Color>
|
||||
<Color x:Key="BackgrondColor4">#aaaaaa</Color>
|
||||
|
||||
<SolidColorBrush x:Key="Background1" Color="{StaticResource BackgrondColor1}" />
|
||||
<SolidColorBrush x:Key="Background2" Color="{StaticResource BackgrondColor2}" />
|
||||
<SolidColorBrush x:Key="Background3" Color="{StaticResource BackgrondColor3}" />
|
||||
<SolidColorBrush x:Key="Background4" Color="{StaticResource BackgrondColor4}" />
|
||||
|
||||
<Color x:Key="FunctionTypeColor">BlueViolet</Color>
|
||||
<Color x:Key="VariableTypeColor">DarkGreen</Color>
|
||||
<Color x:Key="ConstTypeColor">DarkOrange</Color>
|
||||
|
||||
<SolidColorBrush x:Key="FunctionTypeBrush" Color="{StaticResource FunctionTypeColor}" />
|
||||
<SolidColorBrush x:Key="VariableTypeBrush" Color="{StaticResource VariableTypeColor}" />
|
||||
<SolidColorBrush x:Key="ConstTypeBrush" Color="{StaticResource ConstTypeColor}" />
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- 以下为模板中没有合适位置承载的颜色,来自 StaticColorBrushDictionary, -->
|
||||
<!-- 新增分组补充。能复用上面已更新主题色的,直接引用主题色,避免重复硬编码。 -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<!-- 主色渐变(原 mainLinearColorBrush),跟随新的主色调 -->
|
||||
<LinearGradientBrush x:Key="MainLinearColorBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientStop Offset="0.0" Color="{StaticResource PrimaryColor}" />
|
||||
<GradientStop Offset="1.0" Color="{StaticResource DarkPrimaryColor}" />
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!-- 列表/表格相关颜色 -->
|
||||
<SolidColorBrush x:Key="ListCtrlBackColorBrush" Color="{StaticResource RegionColor}" />
|
||||
<SolidColorBrush x:Key="ListHeadBackColorBrush" Color="{StaticResource SecondaryRegionColor}" />
|
||||
<SolidColorBrush x:Key="ListHeadBorderColorBrush" Color="{StaticResource BorderColor}" />
|
||||
<SolidColorBrush x:Key="ListBackColorBrush" Color="{StaticResource RegionColor}" />
|
||||
<SolidColorBrush x:Key="ListRowTitleBackColorBrush" Color="{StaticResource SecondaryRegionColor}" />
|
||||
<Color x:Key="ListRowBorderColor">#f8f8f9</Color>
|
||||
<SolidColorBrush x:Key="ListRowBorderColorBrush" Color="{StaticResource ListRowBorderColor}" />
|
||||
<SolidColorBrush x:Key="ListRowHoverBackColorBrush" Color="{StaticResource SecondaryRegionColor}" />
|
||||
|
||||
<SolidColorBrush x:Key="HorizontalGridLinesBrush" Color="{StaticResource SecondaryRegionColor}" />
|
||||
<SolidColorBrush x:Key="VerticalGridLinesBrush" Color="{StaticResource RegionColor}" />
|
||||
|
||||
<!-- 状态色带透明度的变体,跟随上面更新过的 SuccessColor / DangerColor -->
|
||||
<SolidColorBrush x:Key="SuccessColor50" Color="#5067c23a" />
|
||||
<SolidColorBrush x:Key="DangerColorCC" Color="#CCfa4733" />
|
||||
<SolidColorBrush x:Key="DangerColor80" Color="#80fa4733" />
|
||||
<SolidColorBrush x:Key="DangerColor50" Color="#50fa4733" />
|
||||
<SolidColorBrush x:Key="DangerColor20" Color="#20fa4733" />
|
||||
|
||||
<!-- Flag 标记色:与主题色重复的直接引用主题色,其余保留原值 -->
|
||||
<SolidColorBrush x:Key="FlagGrayBrush" Color="#aaaaaa" />
|
||||
<SolidColorBrush x:Key="FlagRedBrush" Color="{StaticResource DangerColor}" />
|
||||
<SolidColorBrush x:Key="FlagOrangeBrush" Color="{StaticResource WarningColor}" />
|
||||
<SolidColorBrush x:Key="FlagGreenBrush" Color="{StaticResource SuccessColor}" />
|
||||
<SolidColorBrush x:Key="FlagBlueBrush" Color="{StaticResource InfoColor}" />
|
||||
<SolidColorBrush x:Key="FlagPurpleBrush" Color="#c883bf" />
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -14,4 +14,10 @@
|
||||
<ProjectReference Include="..\MAX.Framework\MAX.Framework.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Resources\SkinLocal.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,111 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- 主色调:改为当前使用的紫色系(原 mainColorBrush / mainColorLightBrush / mainColorDarkBrush) -->
|
||||
<Color x:Key="LightPrimaryColor">#F5EBFF</Color>
|
||||
<Color x:Key="PrimaryColor">#98638F</Color>
|
||||
<Color x:Key="DarkPrimaryColor">#6B5393</Color>
|
||||
|
||||
<!-- 危险色:改为当前使用的红色(原 PageWarningBrush / FlagRedBrush) -->
|
||||
<Color x:Key="LightDangerColor">#fff6f7</Color>
|
||||
<Color x:Key="DangerColor">#FA4733</Color>
|
||||
<Color x:Key="DarkDangerColor">#FA4733</Color>
|
||||
|
||||
<!-- 警告色:改为当前使用的橙色(原 FlagOrangeBrush) -->
|
||||
<Color x:Key="LightWarningColor">#fffcf5</Color>
|
||||
<Color x:Key="WarningColor">#FAB533</Color>
|
||||
<Color x:Key="DarkWarningColor">#FAB533</Color>
|
||||
|
||||
<!-- 信息色:改为当前使用的蓝色(原 PageLinkBrush / FlagBlueBrush,也是原模板的主色蓝) -->
|
||||
<Color x:Key="LightInfoColor">#f1fdff</Color>
|
||||
<Color x:Key="InfoColor">#409EFF</Color>
|
||||
<Color x:Key="DarkInfoColor">#409EFF</Color>
|
||||
|
||||
<Color x:Key="LightSuccessColor">#f3fff6</Color>
|
||||
<Color x:Key="SuccessColor">#67C23A</Color>
|
||||
<Color x:Key="DarkSuccessColor">#67C23A</Color>
|
||||
|
||||
<Color x:Key="PrimaryTextColor">#303133</Color>
|
||||
<Color x:Key="SecondaryTextColor">#909399</Color>
|
||||
<Color x:Key="ThirdlyTextColor">#bdbdbd</Color>
|
||||
<Color x:Key="ReverseTextColor">#606266</Color>
|
||||
<Color x:Key="TextIconColor">White</Color>
|
||||
|
||||
<Color x:Key="BorderColor">#e0e0e0</Color>
|
||||
<Color x:Key="SecondaryBorderColor">#909399</Color>
|
||||
<Color x:Key="BackgroundColor">#eeeeee</Color>
|
||||
<Color x:Key="RegionColor">#ffffff</Color>
|
||||
<Color x:Key="SecondaryRegionColor">#eeeeee</Color>
|
||||
<Color x:Key="ThirdlyRegionColor">White</Color>
|
||||
<!-- 标题色跟随新的主色调(紫色) -->
|
||||
<Color x:Key="TitleColor">#98638F</Color>
|
||||
<Color x:Key="SecondaryTitleColor">#98638F</Color>
|
||||
|
||||
<Color x:Key="DefaultColor">White</Color>
|
||||
<Color x:Key="DarkDefaultColor">#f5f5f5</Color>
|
||||
|
||||
<Color x:Key="AccentColor">#f8491e</Color>
|
||||
<Color x:Key="DarkAccentColor">#f8491e</Color>
|
||||
|
||||
<Color x:Key="DarkMaskColor">#20000000</Color>
|
||||
<Color x:Key="DarkOpacityColor">#40000000</Color>
|
||||
|
||||
<SolidColorBrush x:Key="TreeViewItemSelectedBrush" Color="#ACD1F8" />
|
||||
<SolidColorBrush x:Key="TreeViewItemSelectedBrush2" Color="#738BA3" />
|
||||
|
||||
<Color x:Key="BackgrondColor1">#e9e9e9</Color>
|
||||
<Color x:Key="BackgrondColor2">#d3d3d3</Color>
|
||||
<Color x:Key="BackgrondColor3">#c2c2c2</Color>
|
||||
<Color x:Key="BackgrondColor4">#aaaaaa</Color>
|
||||
|
||||
<SolidColorBrush x:Key="Background1" Color="{StaticResource BackgrondColor1}" />
|
||||
<SolidColorBrush x:Key="Background2" Color="{StaticResource BackgrondColor2}" />
|
||||
<SolidColorBrush x:Key="Background3" Color="{StaticResource BackgrondColor3}" />
|
||||
<SolidColorBrush x:Key="Background4" Color="{StaticResource BackgrondColor4}" />
|
||||
|
||||
<Color x:Key="FunctionTypeColor">BlueViolet</Color>
|
||||
<Color x:Key="VariableTypeColor">DarkGreen</Color>
|
||||
<Color x:Key="ConstTypeColor">DarkOrange</Color>
|
||||
|
||||
<SolidColorBrush x:Key="FunctionTypeBrush" Color="{StaticResource FunctionTypeColor}" />
|
||||
<SolidColorBrush x:Key="VariableTypeBrush" Color="{StaticResource VariableTypeColor}" />
|
||||
<SolidColorBrush x:Key="ConstTypeBrush" Color="{StaticResource ConstTypeColor}" />
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- 以下为模板中没有合适位置承载的颜色,来自 StaticColorBrushDictionary, -->
|
||||
<!-- 新增分组补充。能复用上面已更新主题色的,直接引用主题色,避免重复硬编码。 -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<!-- 主色渐变(原 mainLinearColorBrush),跟随新的主色调 -->
|
||||
<LinearGradientBrush x:Key="MainLinearColorBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientStop Offset="0.0" Color="{StaticResource PrimaryColor}" />
|
||||
<GradientStop Offset="1.0" Color="{StaticResource DarkPrimaryColor}" />
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!-- 列表/表格相关颜色 -->
|
||||
<SolidColorBrush x:Key="ListCtrlBackColorBrush" Color="{StaticResource RegionColor}" />
|
||||
<SolidColorBrush x:Key="ListHeadBackColorBrush" Color="{StaticResource SecondaryRegionColor}" />
|
||||
<SolidColorBrush x:Key="ListHeadBorderColorBrush" Color="{StaticResource BorderColor}" />
|
||||
<SolidColorBrush x:Key="ListBackColorBrush" Color="{StaticResource RegionColor}" />
|
||||
<SolidColorBrush x:Key="ListRowTitleBackColorBrush" Color="{StaticResource SecondaryRegionColor}" />
|
||||
<Color x:Key="ListRowBorderColor">#f8f8f9</Color>
|
||||
<SolidColorBrush x:Key="ListRowBorderColorBrush" Color="{StaticResource ListRowBorderColor}" />
|
||||
<SolidColorBrush x:Key="ListRowHoverBackColorBrush" Color="{StaticResource SecondaryRegionColor}" />
|
||||
|
||||
<SolidColorBrush x:Key="HorizontalGridLinesBrush" Color="{StaticResource SecondaryRegionColor}" />
|
||||
<SolidColorBrush x:Key="VerticalGridLinesBrush" Color="{StaticResource RegionColor}" />
|
||||
|
||||
<!-- 状态色带透明度的变体,跟随上面更新过的 SuccessColor / DangerColor -->
|
||||
<SolidColorBrush x:Key="SuccessColor50" Color="#5067c23a" />
|
||||
<SolidColorBrush x:Key="DangerColorCC" Color="#CCfa4733" />
|
||||
<SolidColorBrush x:Key="DangerColor80" Color="#80fa4733" />
|
||||
<SolidColorBrush x:Key="DangerColor50" Color="#50fa4733" />
|
||||
<SolidColorBrush x:Key="DangerColor20" Color="#20fa4733" />
|
||||
|
||||
<!-- Flag 标记色:与主题色重复的直接引用主题色,其余保留原值 -->
|
||||
<SolidColorBrush x:Key="FlagGrayBrush" Color="#aaaaaa" />
|
||||
<SolidColorBrush x:Key="FlagRedBrush" Color="{StaticResource DangerColor}" />
|
||||
<SolidColorBrush x:Key="FlagOrangeBrush" Color="{StaticResource WarningColor}" />
|
||||
<SolidColorBrush x:Key="FlagGreenBrush" Color="{StaticResource SuccessColor}" />
|
||||
<SolidColorBrush x:Key="FlagBlueBrush" Color="{StaticResource InfoColor}" />
|
||||
<SolidColorBrush x:Key="FlagPurpleBrush" Color="#c883bf" />
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -1,4 +1,7 @@
|
||||
<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:hc="https://handyorg.github.io/handycontrol">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Fonts/FontGeometry.xaml" />
|
||||
@@ -12,4 +15,498 @@
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="18" />
|
||||
</Style>
|
||||
<Style BasedOn="{x:Null}" TargetType="Label" />
|
||||
|
||||
|
||||
<Style BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="ProgressBar">
|
||||
<Setter Property="hc:VisualElement.Text" Value="" />
|
||||
<Setter Property="hc:BorderElement.CornerRadius" Value="0" />
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
<!-- DataGrid -->
|
||||
<SolidColorBrush x:Key="ColumnHeaderBackgroundBrush" Color="#B9CCE4" />
|
||||
<SolidColorBrush x:Key="ColumnHeaderBorderBrush" Color="#8094AD" />
|
||||
|
||||
<Style
|
||||
x:Key="DataGridColumnHeader.MarginSmall"
|
||||
BasedOn="{StaticResource DataGridColumnHeaderStyle}"
|
||||
TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
||||
<Setter Property="Background" Value="{StaticResource BackgroundBrush}" />
|
||||
<Setter Property="Padding" Value="6,0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridColumnHeader">
|
||||
<hc:SimplePanel>
|
||||
<Border
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{StaticResource ColumnHeaderBackgroundBrush}"
|
||||
BorderBrush="{StaticResource ColumnHeaderBorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter
|
||||
VerticalAlignment="Center"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<ToggleButton
|
||||
x:Name="ToggleButtonSortDirection"
|
||||
Grid.Column="1"
|
||||
Width="20"
|
||||
Padding="4,0"
|
||||
VerticalAlignment="Center"
|
||||
hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}"
|
||||
hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"
|
||||
Foreground="{DynamicResource TextIconBrush}"
|
||||
IsEnabled="False"
|
||||
Opacity="1"
|
||||
Style="{StaticResource ToggleButtonIconTransparent}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<Thumb
|
||||
x:Name="PART_LeftHeaderGripper"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource ColumnHeaderGripperStyle}" />
|
||||
<Thumb
|
||||
x:Name="PART_RightHeaderGripper"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource ColumnHeaderGripperStyle}" />
|
||||
</hc:SimplePanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="SortDirection" Value="{x:Null}">
|
||||
<Setter TargetName="ToggleButtonSortDirection" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="SortDirection" Value="Ascending">
|
||||
<Setter TargetName="ToggleButtonSortDirection" Property="IsChecked" Value="True" />
|
||||
</Trigger>
|
||||
<Trigger Property="SortDirection" Value="Descending">
|
||||
<Setter TargetName="ToggleButtonSortDirection" Property="IsChecked" Value="False" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="SortDirection" Value="Ascending">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="SortDirection" Value="Descending">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DataGridRowStyle.MarginSmall"
|
||||
BasedOn="{StaticResource DataGridRowStyle}"
|
||||
TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0,1,0,0" />
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="DataGridRowStyle.Rightangle"
|
||||
BasedOn="{StaticResource DataGridRowStyle.MarginSmall}"
|
||||
TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0,1,0,0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
||||
<SelectiveScrollingGrid>
|
||||
<SelectiveScrollingGrid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</SelectiveScrollingGrid.ColumnDefinitions>
|
||||
<SelectiveScrollingGrid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</SelectiveScrollingGrid.RowDefinitions>
|
||||
<Border
|
||||
Name="DGR_Border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="0"
|
||||
SelectiveScrollingGrid.ColumnSpan="2"
|
||||
SnapsToDevicePixels="True" />
|
||||
<DataGridCellsPresenter
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
VerticalContentAlignment="Center"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
SelectiveScrollingGrid.Column="1"
|
||||
SelectiveScrollingGrid.Row="0"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<DataGridDetailsPresenter
|
||||
Margin="0,6"
|
||||
SelectiveScrollingGrid.Column="1"
|
||||
SelectiveScrollingGrid.Row="1"
|
||||
SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
Visibility="{TemplateBinding DetailsVisibility}" />
|
||||
<DataGridRowHeader
|
||||
SelectiveScrollingGrid.Column="0"
|
||||
SelectiveScrollingGrid.Row="0"
|
||||
SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
|
||||
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}" />
|
||||
</SelectiveScrollingGrid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DataGridCellStyle.Rightangle"
|
||||
BasedOn="{StaticResource DataGridCellStyle}"
|
||||
TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="hc:BorderElement.CornerRadius" Value="0" />
|
||||
<Setter Property="Margin" Value="0,1,0,0" />
|
||||
</Style>
|
||||
<!-- {x:Type DataGrid} -->
|
||||
|
||||
<Style
|
||||
x:Key="DataGrid.Custom"
|
||||
BasedOn="{StaticResource DataGridBaseStyle}"
|
||||
TargetType="{x:Type DataGrid}">
|
||||
<Setter Property="IsReadOnly" Value="True" />
|
||||
<Setter Property="RowStyle" Value="{StaticResource DataGridRowStyle.Rightangle}" />
|
||||
<Setter Property="CellStyle" Value="{StaticResource DataGridCellStyle.Rightangle}" />
|
||||
<Setter Property="ColumnHeaderStyle" Value="{StaticResource DataGridColumnHeader.MarginSmall}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Background" Value="{StaticResource BackgroundBrush}" />
|
||||
<Setter Property="hc:BorderElement.CornerRadius" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGrid">
|
||||
<ControlTemplate.Resources>
|
||||
<!--<Storyboard x:Key="StoryboardMouseEnter">
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8" />
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8" />
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<Storyboard x:Key="StoryboardMouseLeave">
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity">
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity">
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
</Storyboard>-->
|
||||
</ControlTemplate.Resources>
|
||||
<Border
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="DG_ScrollViewer" Focusable="false">
|
||||
<ScrollViewer.Template>
|
||||
<ControlTemplate TargetType="ScrollViewer">
|
||||
<Border Margin="0,0,-1,0" ClipToBounds="True">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Background="{StaticResource ColumnHeaderBackgroundBrush}">
|
||||
<Button
|
||||
Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType=DataGrid}, Converter={StaticResource DoubleMinConverter}}"
|
||||
Height="auto"
|
||||
MaxHeight="30"
|
||||
hc:IconElement.Geometry="{StaticResource AllGeometry}"
|
||||
Command="{x:Static DataGrid.SelectAllCommand}"
|
||||
Foreground="{DynamicResource PrimaryBrush}"
|
||||
IsEnabled="False"
|
||||
Style="{StaticResource ButtonIcon}"
|
||||
Visibility="Hidden">
|
||||
<!--<Button.Visibility>
|
||||
<MultiBinding Converter="{StaticResource DataGridSelectAllButtonVisibilityConverter}">
|
||||
<Binding Path="HeadersVisibility" RelativeSource="{RelativeSource AncestorType=DataGrid}" />
|
||||
<Binding Path="(hc:DataGridAttach.ShowSelectAllButton)" RelativeSource="{RelativeSource AncestorType=DataGrid}" />
|
||||
</MultiBinding>
|
||||
</Button.Visibility>-->
|
||||
</Button>
|
||||
</Grid>
|
||||
<DataGridColumnHeadersPresenter
|
||||
x:Name="PART_ColumnHeadersPresenter"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}" />
|
||||
<ScrollContentPresenter
|
||||
x:Name="PART_ScrollContentPresenter"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
CanContentScroll="{TemplateBinding CanContentScroll}" />
|
||||
<hc:ToggleBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
IsChecked="{Binding HasItems, RelativeSource={RelativeSource AncestorType=DataGrid}, Mode=OneWay}">
|
||||
<hc:ToggleBlock.UnCheckedContent>
|
||||
<hc:Empty
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}" />
|
||||
</hc:ToggleBlock.UnCheckedContent>
|
||||
</hc:ToggleBlock>
|
||||
<ScrollBar
|
||||
x:Name="PART_VerticalScrollBar"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="3"
|
||||
Grid.Column="2"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
Orientation="Vertical"
|
||||
Style="{StaticResource BaseStyle}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
||||
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<ScrollBar
|
||||
x:Name="PART_HorizontalScrollBar"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Bottom"
|
||||
Maximum="{TemplateBinding ScrollableWidth}"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource BaseStyle}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
|
||||
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--<ControlTemplate.Triggers>
|
||||
<EventTrigger RoutedEvent="MouseEnter">
|
||||
<BeginStoryboard Storyboard="{StaticResource StoryboardMouseEnter}" />
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="MouseLeave">
|
||||
<BeginStoryboard Storyboard="{StaticResource StoryboardMouseLeave}" />
|
||||
</EventTrigger>
|
||||
</ControlTemplate.Triggers>-->
|
||||
</ControlTemplate>
|
||||
</ScrollViewer.Template>
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
<Style x:Key="DataGridLinkColumn" TargetType="Hyperlink">
|
||||
<Setter Property="Foreground" Value="{StaticResource PrimaryBrush}" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=DataGridRow}, Path=IsSelected}" Value="True">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextIconBrush}" />
|
||||
</DataTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="false" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}" />
|
||||
</MultiTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
|
||||
<Style
|
||||
x:Key="DataGridRowStyle.Rightangle.Small"
|
||||
BasedOn="{StaticResource DataGridRowStyle.MarginSmall}"
|
||||
TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="Padding" Value="0,0" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0,1,0,0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
||||
<SelectiveScrollingGrid>
|
||||
<SelectiveScrollingGrid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</SelectiveScrollingGrid.ColumnDefinitions>
|
||||
<SelectiveScrollingGrid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</SelectiveScrollingGrid.RowDefinitions>
|
||||
<Border
|
||||
Name="DGR_Border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="0"
|
||||
SelectiveScrollingGrid.ColumnSpan="2"
|
||||
SnapsToDevicePixels="True" />
|
||||
<DataGridCellsPresenter
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
VerticalContentAlignment="Center"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
SelectiveScrollingGrid.Column="1"
|
||||
SelectiveScrollingGrid.Row="0"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<DataGridDetailsPresenter
|
||||
Margin="0,6"
|
||||
SelectiveScrollingGrid.Column="1"
|
||||
SelectiveScrollingGrid.Row="1"
|
||||
SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
Visibility="{TemplateBinding DetailsVisibility}" />
|
||||
<DataGridRowHeader
|
||||
SelectiveScrollingGrid.Column="0"
|
||||
SelectiveScrollingGrid.Row="0"
|
||||
SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
|
||||
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}" />
|
||||
</SelectiveScrollingGrid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="DataGridCellStyle.Custom.Small"
|
||||
BasedOn="{StaticResource DataGridCellStyle}"
|
||||
TargetType="DataGridCell">
|
||||
<Setter Property="Padding" Value="2,0" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0,0,1,0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Right" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<Border Background="Transparent">
|
||||
<Border
|
||||
Margin="0,0,0,0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="0"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<!--<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
|
||||
</Trigger>-->
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsSelected}" Value="True" />
|
||||
<!--<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}, Path=IsKeyboardFocusWithin}" Value="False" />-->
|
||||
</MultiDataTrigger.Conditions>
|
||||
<MultiDataTrigger.Setters>
|
||||
<Setter Property="Background" Value="#cde6f7" />
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />-->
|
||||
<!--<Setter Property="BorderBrush" Value="#a8c1db" />-->
|
||||
<Setter Property="BorderThickness" Value="0,1,1,0" />
|
||||
</MultiDataTrigger.Setters>
|
||||
</MultiDataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DataGridColumnHeaderStyle.Custom"
|
||||
BasedOn="{StaticResource DataGridColumnHeader.MarginSmall}"
|
||||
TargetType="DataGridColumnHeader">
|
||||
<Setter Property="BorderBrush" Value="#ccc" />
|
||||
<Setter Property="BorderThickness" Value="1,0,1,0" />
|
||||
<Setter Property="Margin" Value="-1,0,0,0" />
|
||||
<Setter Property="Padding" Value="4,0" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DataGridRowHeaderStyle.Custom"
|
||||
BasedOn="{StaticResource DataGridRowHeaderStyle}"
|
||||
TargetType="DataGridRowHeader">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0,0,1,0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridRowHeader}">
|
||||
<hc:SimplePanel>
|
||||
<Border
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<ContentPresenter
|
||||
VerticalAlignment="Center"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Thumb
|
||||
Name="PART_TopHeaderGripper"
|
||||
VerticalAlignment="Top"
|
||||
Style="{StaticResource RowHeaderGripperStyle}" />
|
||||
<Thumb
|
||||
Name="PART_BottomHeaderGripper"
|
||||
VerticalAlignment="Bottom"
|
||||
Style="{StaticResource RowHeaderGripperStyle}" />
|
||||
</hc:SimplePanel>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!-- {x:Type DataGrid} -->
|
||||
<Style
|
||||
x:Key="DataGrid.Custom.Small"
|
||||
BasedOn="{StaticResource DataGrid.Custom}"
|
||||
TargetType="{x:Type DataGrid}">
|
||||
<Setter Property="RowHeight" Value="18" />
|
||||
<Setter Property="RowStyle" Value="{StaticResource DataGridRowStyle.Rightangle.Small}" />
|
||||
|
||||
<Setter Property="ColumnHeaderStyle" Value="{StaticResource DataGridColumnHeader.MarginSmall}" />
|
||||
<!--<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"></Setter>-->
|
||||
<!--<Setter Property="BorderThickness" Value="1"></Setter>-->
|
||||
<Setter Property="Padding" Value="1" />
|
||||
|
||||
<Setter Property="RowHeaderStyle" Value="{StaticResource DataGridRowHeaderStyle.Custom}" />
|
||||
|
||||
<Setter Property="CellStyle" Value="{StaticResource DataGridCellStyle.Custom.Small}" />
|
||||
<Setter Property="ColumnHeaderStyle" Value="{StaticResource DataGridColumnHeaderStyle.Custom}" />
|
||||
<Setter Property="ColumnHeaderHeight" Value="20" />
|
||||
<!--<Setter Property="Background" Value="{StaticResource BackgroundBrush}"></Setter>-->
|
||||
<!--<Setter Property="hc:BorderElement.CornerRadius" Value="0"></Setter>-->
|
||||
|
||||
</Style>
|
||||
|
||||
|
||||
<!-- DataGridEnd -->
|
||||
</ResourceDictionary>
|
||||
@@ -8,6 +8,8 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
||||
<PackageReference Include="HandyControl" Version="3.6.0.9" />
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Resources\Fonts\iconfont.ttf" />
|
||||
@@ -42,6 +44,10 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>FontGeometry.tt</DependentUpon>
|
||||
</Page>
|
||||
<Page Update="Resources\SkinLocal.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in new issue
Block a user