xaml用制表符缩进 优化订单分配逻辑

This commit is contained in:
wule committed 2026-08-28 04:28:48 +08:00
1 parent 237fad81eb
commit aeb30c1171
22 files changed
+2885 -2435

No files matched your search

+195 -166
View File
@@ -1,7 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--使用自定义属性模板去除Button高亮显示框-->
<!--<Style TargetType="Button">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- 使用自定义属性模板去除Button高亮显示框 -->
<!--<Style TargetType="Button">
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="Template">
<Setter.Value>
@@ -13,7 +12,7 @@
</Setter.Value>
</Setter>
</Style>-->
<!--<Style TargetType="Button">
<!--<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
@@ -34,170 +33,200 @@
</Setter.Value>
</Setter>
</Style>-->
<Style x:Key="BaseButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="buttonBorder" Background="{DynamicResource mainColorBrush}" Cursor="Hand"
BorderBrush="{DynamicResource mainColorDarkBrush}" CornerRadius="0"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
</ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource mainColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource mainColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BaseButtonLightStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource mainColorBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="buttonBorder" Background="{DynamicResource mainColorLightBrush}" Cursor="Hand"
BorderBrush="{DynamicResource mainColorBrush}" CornerRadius="0"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
</ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource mainColorDarkBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource mainColorDarkBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BasePageButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="buttonBorder" Background="{DynamicResource pageColorBrush}" Cursor="Hand"
BorderBrush="{DynamicResource pageColorDarkBrush}" CornerRadius="4"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
</ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource pageColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource pageColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BasePageButtonLeftSquareStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="buttonBorder" Background="{DynamicResource pageColorBrush}" Cursor="Hand"
BorderBrush="{DynamicResource pageColorDarkBrush}" CornerRadius="0 4 4 0"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
</ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource pageColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource pageColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BasePageButtonLightStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource pageColorBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource pageColorBrush}"/>
<Setter Property="Background" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="btnBorder" Background="{TemplateBinding Background}" Cursor="Hand"
BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="4"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<!--<ContentPresenter Content="{TemplateBinding Content}"
<Style x:Key="BaseButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="buttonBorder"
Padding="{TemplateBinding Padding}"
Background="{DynamicResource mainColorBrush}"
BorderBrush="{DynamicResource mainColorDarkBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="0"
Cursor="Hand">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="buttonBorder" Property="Background" Value="{DynamicResource mainColorDarkBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="buttonBorder" Property="Background" Value="{DynamicResource mainColorDarkBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BaseButtonLightStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource mainColorBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="buttonBorder"
Padding="{TemplateBinding Padding}"
Background="{DynamicResource mainColorLightBrush}"
BorderBrush="{DynamicResource mainColorBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="0"
Cursor="Hand">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="buttonBorder" Property="Background" Value="{DynamicResource mainColorDarkBrush}" />
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="buttonBorder" Property="Background" Value="{DynamicResource mainColorDarkBrush}" />
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BasePageButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource pageColorLightBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="buttonBorder"
Padding="{TemplateBinding Padding}"
Background="{DynamicResource pageColorBrush}"
BorderBrush="{DynamicResource pageColorDarkBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Cursor="Hand">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="buttonBorder" Property="Background" Value="{DynamicResource pageColorDarkBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="buttonBorder" Property="Background" Value="{DynamicResource pageColorDarkBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BasePageButtonLeftSquareStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource pageColorLightBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="buttonBorder"
Padding="{TemplateBinding Padding}"
Background="{DynamicResource pageColorBrush}"
BorderBrush="{DynamicResource pageColorDarkBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="0 4 4 0"
Cursor="Hand">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="buttonBorder" Property="Background" Value="{DynamicResource pageColorDarkBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="buttonBorder" Property="Background" Value="{DynamicResource pageColorDarkBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BasePageButtonLightStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource pageColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource pageColorBrush}" />
<Setter Property="Background" Value="{DynamicResource pageColorLightBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="btnBorder"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Cursor="Hand">
<!--<ContentPresenter Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
</ContentPresenter>-->
<Label Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}"
ContentStringFormat="{TemplateBinding ContentStringFormat}" x:Name="lblContent"
ContentTemplate="{TemplateBinding ContentTemplate}" Padding="0" Margin="0"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" TargetName="lblContent" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="Background" TargetName="btnBorder" Value="{DynamicResource pageColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Foreground" TargetName="lblContent" Value="{DynamicResource pageColorLightBrush}"/>
<Setter Property="Background" TargetName="btnBorder" Value="{DynamicResource pageColorDarkBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Label
x:Name="lblContent"
Margin="0"
Padding="0"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{TemplateBinding Foreground}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="lblContent" Property="Foreground" Value="{DynamicResource pageColorLightBrush}" />
<Setter TargetName="btnBorder" Property="Background" Value="{DynamicResource pageColorDarkBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="lblContent" Property="Foreground" Value="{DynamicResource pageColorLightBrush}" />
<Setter TargetName="btnBorder" Property="Background" Value="{DynamicResource pageColorDarkBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>