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

@@ -1048,7 +1048,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
bool isUpdate = false;
PddBuyerAfterSaleLiteInfo afterSale = null;
if (!lstPddBuyerAfterSaleInfoLite.ToList().Any(or => or.afterSalesId == af.afterSalesId))
if (!lstPddBuyerAfterSaleInfoLite.Any(or => or.afterSalesId == af.afterSalesId))
{
isUpdate = true;
afterSale = af;
File diff suppressed because it is too large. Load diff
@@ -1459,6 +1459,14 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (!order.IsWaitReceive)
return true;
if (chkNeedCheckExpress.IsChecked == true)
{
var rst1 = order.orderItems.Any(oi => !oi.TransitRefundStatusStr.IsNullOrEmpty() && !oi.TransitRefundStatusStr.Contains("退款成功"));
var rst2 = order.out_shipped == 2 && !string.IsNullOrEmpty(order.out_express_no);
if (!rst1 && !rst2)
return true;
}
if (chkWaitReceiveBuyerIsNotSend.IsChecked == true && order.orderItems.All(oi => oi.BuyerTransitWaybillStatusStr != "买手未发货"))
return true;
if (chkWaitReceiveBuyerIsSend.IsChecked == true && order.orderItems.All(oi => oi.BuyerTransitWaybillStatusStr != "买手已发货"))
@@ -2524,6 +2532,17 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
FilterOrders();
}
private void chkNeedCheckExpress_Click(object sender, RoutedEventArgs e)
{
if (sender is CheckBox chk)
{
var isCheck = !chk.IsChecked.ParseToBool();
chkNeedCheckExpress.IsChecked = false;
chk.IsChecked = !isCheck;
}
FilterOrders();
}
}
public class OrderFilterConfig : PropertyNotifyObject
@@ -1,39 +1,86 @@
<UserControl x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderListRowHeaderCtrl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls" xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
mc:Ignorable="d"
d:DesignHeight="50" d:DesignWidth="800">
<UserControl
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderListRowHeaderCtrl"
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:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
d:DesignHeight="50"
d:DesignWidth="800"
mc:Ignorable="d">
<Border Background="{StaticResource ListRowBorderColorBrush}" CornerRadius="12,12,0,0" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="20"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" Margin="8,8,-4,8" VerticalAlignment="Center" FontSize="20" Background="Transparent" IsReadOnly="True" Text="{Binding OrderBuyType}" BorderThickness="0"
Visibility="{Binding OrderBuyType, Converter={StaticResource HasTextVisibility}}" Foreground="{Binding OrderBuyTypeColor}" FontWeight="ExtraBold"/>
<TextBox Grid.Column="1" Margin="8,8,-4,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" Text="店铺单号:" BorderThickness="0" />
<uc:UcWaterMarkTextBox1 Grid.Column="2" Foreground="{StaticResource PageLinkBrush}" Cursor="Hand" WaterMark="订单号" x:Name="txtOrderId" Margin="0,8,4,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" Text="{Binding order_id}" BorderThickness="0" />
<Border Grid.Column="3" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand"
Tag="{Binding order_id}" MouseLeftButtonDown="Path_MouseLeftButtonDown">
<Path Margin="0,0,0,0" Fill="{StaticResource PageLinkBrush}" Tag="{Binding order_id}" MouseLeftButtonDown="Path_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
</Border>
<!--<Border x:Name="borderDeadline" Grid.Column="3" Margin="8,0,0,0" Background="#e8fbf9" BorderBrush="#d0fbea" BorderThickness="1" MinWidth="30" Height="24" CornerRadius="2">
<Border Background="{StaticResource ListRowBorderColorBrush}" CornerRadius="12,12,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<TextBox
Grid.Column="0"
Margin="8,8,-4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
FontSize="20"
FontWeight="ExtraBold"
Foreground="{Binding OrderBuyTypeColor}"
IsReadOnly="True"
Text="{Binding OrderBuyType}"
Visibility="{Binding OrderBuyType, Converter={StaticResource HasTextVisibility}}" />
<TextBox
Grid.Column="1"
Margin="8,8,-4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
FontSize="14"
IsReadOnly="True"
Text="店铺单号:" />
<uc:UcWaterMarkTextBox1
x:Name="txtOrderId"
Grid.Column="2"
Margin="0,8,4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Cursor="Hand"
FontSize="14"
Foreground="{StaticResource PageLinkBrush}"
IsReadOnly="True"
Text="{Binding order_id}"
WaterMark="订单号" />
<Border
Grid.Column="3"
Width="12"
Height="12"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="Path_MouseLeftButtonDown"
Tag="{Binding order_id}">
<Path
Margin="0,0,0,0"
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
Fill="{StaticResource PageLinkBrush}"
MouseLeftButtonDown="Path_MouseLeftButtonDown"
Stretch="Uniform"
Tag="{Binding order_id}" />
</Border>
<!--<Border x:Name="borderDeadline" Grid.Column="3" Margin="8,0,0,0" Background="#e8fbf9" BorderBrush="#d0fbea" BorderThickness="1" MinWidth="30" Height="24" CornerRadius="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
@@ -43,57 +90,166 @@
<TextBox Grid.Column="0" Margin="2,0,2,1" Foreground="White" VerticalContentAlignment="Center" VerticalAlignment="Center" Background="Transparent" IsReadOnly="True" MinWidth="20"
Text="{Binding DeliveryDeadlineStatusStr}" BorderThickness="0" />
</Border>
<TextBox x:Name="txtDeadline" Grid.Column="1" Margin="2,0,2,1" Foreground="#0397b5" VerticalContentAlignment="Center" VerticalAlignment="Center" Background="Transparent" IsReadOnly="True" MinWidth="20"
<TextBox x:Name="txtDeadline" Grid.Column="1" Margin="2,0,2,1" Foreground="#0397b5" VerticalContentAlignment="Center" VerticalAlignment="Center" Background="Transparent" IsReadOnly="True" MinWidth="20"
Text="{Binding DeliveryDeadlineStr}" BorderThickness="0" />
</Grid>
</Border>-->
<Border Grid.Column="4" x:Name="borderDeadline" Margin="8,0,0,0" Background="{Binding StatusBoxBackColor}" BorderBrush="{Binding StatusBoxBorderColor}" BorderThickness="1" MinWidth="30" Height="24" CornerRadius="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Border x:Name="borderDeadlineHead" Background="{Binding StatusBoxForeColor}" CornerRadius="2,0,10,2">
<TextBox Grid.Column="0" Margin="2,0,2,1" Foreground="White" VerticalContentAlignment="Center" VerticalAlignment="Center" Background="Transparent" IsReadOnly="True" MinWidth="20"
Text="{Binding DeliveryDeadlineStatusStr}" BorderThickness="0" />
</Border>
<TextBox x:Name="txtDeadline" Grid.Column="1" Margin="2,0,2,1" Foreground="{Binding StatusBoxForeColor}" VerticalContentAlignment="Center" VerticalAlignment="Center" Background="Transparent" IsReadOnly="True" MinWidth="20"
Text="{Binding DeliveryDeadlineStr}" BorderThickness="0" />
</Grid>
</Border>
<Border
x:Name="borderDeadline"
Grid.Column="4"
Height="24"
MinWidth="30"
Margin="8,0,0,0"
Background="{Binding StatusBoxBackColor}"
BorderBrush="{Binding StatusBoxBorderColor}"
BorderThickness="1"
CornerRadius="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border
x:Name="borderDeadlineHead"
Background="{Binding StatusBoxForeColor}"
CornerRadius="2,0,10,2">
<TextBox
Grid.Column="0"
MinWidth="20"
Margin="2,0,2,1"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="White"
IsReadOnly="True"
Text="{Binding DeliveryDeadlineStatusStr}" />
</Border>
<TextBox
x:Name="txtDeadline"
Grid.Column="1"
MinWidth="20"
Margin="2,0,2,1"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="{Binding StatusBoxForeColor}"
IsReadOnly="True"
Text="{Binding DeliveryDeadlineStr}" />
</Grid>
</Border>
<Image Grid.Column="5" Margin="8,8,0,8" Width="24" Height="24" Source="{StaticResource imgOrderWeishopIcon}"></Image>
<uc:UcWaterMarkTextBox1 WaterMark="店铺状态" x:Name="txtShopLoginStatus" Grid.Column="5" HorizontalAlignment="Right" Margin="0,12,-6,0" Padding="0" FontWeight="Bold"
VerticalAlignment="Center" FontSize="7" Background="{StaticResource ListHeadBackColorBrush}" IsReadOnly="True"
Text="{Binding Shop.LoginStatusStr}" BorderThickness="0"
Foreground="{Binding Shop.LoginStatusStr, Converter={StaticResource statusToColorBrushConverter}}"/>
<uc:UcWaterMarkTextBox1 Grid.Column="6" Foreground="{StaticResource PageLinkBrush}" Cursor="Hand" WaterMark="店铺名称" x:Name="txtShopName" Margin="4,8,4,8" VerticalAlignment="Center"
FontSize="14" Background="Transparent" IsReadOnly="True" Text="{Binding shop_name}" BorderThickness="0" />
<Border Grid.Column="7" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand"
Tag="{Binding order_id}" MouseLeftButtonDown="pathShop_MouseLeftButtonDown">
<Path Margin="0,0,0,0" Fill="{StaticResource PageLinkBrush}" Tag="{Binding order_id}" MouseLeftButtonDown="pathShop_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
</Border>
<uc:UcWaterMarkTextBox1 WaterMark="该订单共有 1 条不同商品记录" x:Name="txtCount" Grid.Column="9" Margin="8,8,0,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" BorderThickness="0" />
<Image
Grid.Column="5"
Width="24"
Height="24"
Margin="8,8,0,8"
Source="{StaticResource imgOrderWeishopIcon}" />
<uc:UcWaterMarkTextBox1
x:Name="txtShopLoginStatus"
Grid.Column="5"
Margin="0,12,-6,0"
Padding="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="{StaticResource ListHeadBackColorBrush}"
BorderThickness="0"
FontSize="7"
FontWeight="Bold"
Foreground="{Binding Shop.LoginStatusStr, Converter={StaticResource statusToColorBrushConverter}}"
IsReadOnly="True"
Text="{Binding Shop.LoginStatusStr}"
WaterMark="店铺状态" />
<uc:UcWaterMarkTextBox1
x:Name="txtShopName"
Grid.Column="6"
Margin="4,8,4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Cursor="Hand"
FontSize="14"
Foreground="{StaticResource PageLinkBrush}"
IsReadOnly="True"
Text="{Binding shop_name}"
WaterMark="店铺名称" />
<Border Grid.Column="11" Width="auto" Height="15" Background="Transparent" VerticalAlignment="Center" Cursor="Hand" Margin="2" x:Name="borderFlag" MouseLeftButtonDown="borderFlag_MouseLeftButtonDown">
<!--<Path Margin="0,0,0,0" Fill="{StaticResource FlagGrayBrush}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />-->
<WrapPanel VerticalAlignment="Center">
<TextBlock Text="隐藏标记" FontSize="12" VerticalAlignment="Center" Foreground="Gray"></TextBlock>
<Path Margin="2,0,0,0" Height="15" Width="15" Fill="{Binding colour_flag,Converter={StaticResource flagColorConverter}}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />
</WrapPanel>
</Border>
<Border
Grid.Column="7"
Width="12"
Height="12"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="pathShop_MouseLeftButtonDown"
Tag="{Binding order_id}">
<Path
Margin="0,0,0,0"
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
Fill="{StaticResource PageLinkBrush}"
MouseLeftButtonDown="pathShop_MouseLeftButtonDown"
Stretch="Uniform"
Tag="{Binding order_id}" />
</Border>
<!--<Border Grid.Column="11" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand">
<uc:UcWaterMarkTextBox1
x:Name="txtCount"
Grid.Column="9"
Margin="8,8,0,8"
VerticalAlignment="Center"
d:Text="该订单共有 x 条不同商品记录"
Background="Transparent"
BorderThickness="0"
FontSize="14"
Foreground="Gray"
IsReadOnly="True"
WaterMark="该订单共有 1 条不同商品记录" />
<TextBlock
Grid.Column="11"
Margin="10"
VerticalAlignment="Center"
d:Text="仅退款/退货退款"
Foreground="Gray"
Text="{Binding RefundTypeStr}" />
<Border
x:Name="borderFlag"
Grid.Column="12"
Width="auto"
Height="15"
Margin="2"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="borderFlag_MouseLeftButtonDown">
<!--<Path Margin="0,0,0,0" Fill="{StaticResource FlagGrayBrush}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />-->
<WrapPanel VerticalAlignment="Center">
<TextBlock
VerticalAlignment="Center"
FontSize="12"
Foreground="Gray"
Text="隐藏标记" />
<Path
Width="15"
Height="15"
Margin="2,0,0,0"
d:Fill="SkyBlue"
Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z"
Fill="{Binding colour_flag, Converter={StaticResource flagColorConverter}}"
Stretch="Uniform" />
</WrapPanel>
</Border>
<!--<Border Grid.Column="11" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand">
<Path Margin="0,0,0,0" Fill="{StaticResource PageLinkBrush}" MouseLeftButtonDown="pathShop_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
</Border>-->
</Grid>
</Border>
</Grid>
</Border>
</UserControl>
@@ -547,7 +547,8 @@
Style="{StaticResource TextBlockIcon}"
Text="{StaticResource txt-gift}" />
<TextBlock
VerticalAlignment="Center" d:Text="礼物发货成功"
VerticalAlignment="Center"
d:Text="礼物发货成功"
Foreground="{Binding ElementName=b_gift, Path=BorderBrush}"
Text="{Binding ItemOrder.GiftOrderStatusStr}" />
</WrapPanel>
@@ -1114,7 +1114,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
if (this.DataContext is oms_wei_order_item_info orderItem)
{
if (orderItem.ItemTransitOrder?.warehouse_status != 2 && orderItem.ItemTransitOrder?.warehouse_status != 1 && orderItem.AddEditTransitWarehouseAfterSaleStr == "添加")
if (orderItem.ItemTransitOrder?.warehouse_status != 3 && orderItem.ItemTransitOrder?.warehouse_status != 2 && orderItem.ItemTransitOrder?.warehouse_status != 1 && orderItem.AddEditTransitWarehouseAfterSaleStr == "添加")
{
BaseMsgWindow.ShowError("商品未出库,请选择中转仓拒收!");
return;
@@ -1,12 +1,11 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="Ellipse" x:Key="LineEllipse">
<Setter Property="Width" Value="7"></Setter>
<Setter Property="Height" Value="7"></Setter>
<Setter Property="Fill" Value="White"></Setter>
<Setter Property="Stroke" Value="#1677ff"></Setter>
<Setter Property="StrokeThickness" Value="2"></Setter>
<Setter Property="ToolTipService.InitialShowDelay" Value="50"></Setter>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="LineEllipse" TargetType="Ellipse">
<Setter Property="Width" Value="7" />
<Setter Property="Height" Value="7" />
<Setter Property="Fill" Value="White" />
<Setter Property="Stroke" Value="#1677ff" />
<Setter Property="StrokeThickness" Value="2" />
<Setter Property="ToolTipService.InitialShowDelay" Value="50" />
<Setter Property="ToolTipService.BetweenShowDelay" Value="0" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
+1 -2
View File
@@ -1,5 +1,4 @@
<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">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Charts\Chart.xaml" />
+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>
+467 -348
View File
@@ -1,179 +1,206 @@
<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:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"-->
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF"/>-->
<SolidColorBrush x:Key="TextBox.Static.Background" Color="Transparent"/>
<Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="MinWidth" Value="0"/>
<Setter Property="MinHeight" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
<!-- xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" -->
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle
Margin="2"
SnapsToDevicePixels="true"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeDashArray="1 2"
StrokeThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF"/>-->
<SolidColorBrush x:Key="TextBox.Static.Background" Color="Transparent" />
<Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="AllowDrop" Value="true" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<ScrollViewer
x:Name="PART_ContentHost"
Background="Transparent"
Focusable="false"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFF0F0F0" Offset="0.0"/>
<GradientStop Color="#FFE5E5E5" Offset="1.0"/>
</LinearGradientBrush>-->
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Static.Border" Color="#FFACACAC"/>
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF606060"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#FFABADB3"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
<LinearGradientBrush x:Key="ComboBox.MouseOver.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFECF4FC" Offset="0.0"/>
<GradientStop Color="#FFDCECFC" Offset="1.0"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#FF7EB4EA"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#FF000000"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="#FFFFFFFF"/>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#FF7EB4EA"/>
<LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFEBF4FC" Offset="0.0"/>
<GradientStop Color="#FFDCECFC" Offset="1.0"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA"/>
<LinearGradientBrush x:Key="ComboBox.Pressed.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFDAECFC" Offset="0.0"/>
<GradientStop Color="#FFC4E0FC" Offset="1.0"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#FF569DE5"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#FF000000"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#FFFFFFFF"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#FF569DE5"/>
<LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFDAEBFC" Offset="0.0"/>
<GradientStop Color="#FFC4E0FC" Offset="1.0"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="ClickMode" Value="Press"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="templateRoot" Background="{StaticResource ComboBox.Static.Background}" BorderBrush="{StaticResource ComboBox.Static.Border}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
<Border x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" Margin="0" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
<Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>
</Border>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Background}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Border}"/>
<Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Background}"/>
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Border}"/>
</MultiDataTrigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Border}"/>
<Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}"/>
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}"/>
</MultiDataTrigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Background}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Border}"/>
<Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}"/>
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}"/>
</MultiDataTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Background}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Border}"/>
<Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}"/>
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}"/>
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
</Grid.ColumnDefinitions>
<!--<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="Transparent" />
<SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="Transparent" />
<SolidColorBrush x:Key="ComboBox.Static.Border" Color="#FFACACAC" />
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF606060" />
<SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#FFABADB3" />
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent" />
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent" />
<LinearGradientBrush x:Key="ComboBox.MouseOver.Background" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#FFECF4FC" />
<GradientStop Offset="1.0" Color="#FFDCECFC" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#FF7EB4EA" />
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#FF000000" />
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#FF7EB4EA" />
<LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#FFEBF4FC" />
<GradientStop Offset="1.0" Color="#FFDCECFC" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA" />
<LinearGradientBrush x:Key="ComboBox.Pressed.Background" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#FFDAECFC" />
<GradientStop Offset="1.0" Color="#FFC4E0FC" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#FF569DE5" />
<SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#FF000000" />
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#FF569DE5" />
<LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#FFDAEBFC" />
<GradientStop Offset="1.0" Color="#FFC4E0FC" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5" />
<SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0" />
<SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9" />
<SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF" />
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF" />
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent" />
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent" />
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Focusable" Value="false" />
<Setter Property="ClickMode" Value="Press" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border
x:Name="templateRoot"
Background="{StaticResource ComboBox.Static.Background}"
BorderBrush="{StaticResource ComboBox.Static.Border}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true">
<Border
x:Name="splitBorder"
Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
Margin="0"
HorizontalAlignment="Right"
BorderBrush="Transparent"
BorderThickness="1"
SnapsToDevicePixels="true">
<Path
x:Name="arrow"
Margin="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
Fill="{StaticResource ComboBox.Static.Glyph}" />
</Border>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true" />
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false" />
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false" />
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true" />
</MultiDataTrigger.Conditions>
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource ComboBox.Static.Editable.Background}" />
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource ComboBox.Static.Editable.Border}" />
<Setter TargetName="splitBorder" Property="Background" Value="{StaticResource ComboBox.Static.Editable.Button.Background}" />
<Setter TargetName="splitBorder" Property="BorderBrush" Value="{StaticResource ComboBox.Static.Editable.Button.Border}" />
</MultiDataTrigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="arrow" Property="Fill" Value="{StaticResource ComboBox.MouseOver.Glyph}" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false" />
</MultiDataTrigger.Conditions>
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource ComboBox.MouseOver.Background}" />
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource ComboBox.MouseOver.Border}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true" />
</MultiDataTrigger.Conditions>
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource ComboBox.MouseOver.Editable.Background}" />
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource ComboBox.MouseOver.Editable.Border}" />
<Setter TargetName="splitBorder" Property="Background" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}" />
<Setter TargetName="splitBorder" Property="BorderBrush" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}" />
</MultiDataTrigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="arrow" Property="Fill" Value="{StaticResource ComboBox.Pressed.Glyph}" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false" />
</MultiDataTrigger.Conditions>
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource ComboBox.Pressed.Background}" />
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource ComboBox.Pressed.Border}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true" />
</MultiDataTrigger.Conditions>
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource ComboBox.Pressed.Editable.Background}" />
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource ComboBox.Pressed.Editable.Border}" />
<Setter TargetName="splitBorder" Property="Background" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}" />
<Setter TargetName="splitBorder" Property="BorderBrush" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}" />
</MultiDataTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="arrow" Property="Fill" Value="{StaticResource ComboBox.Disabled.Glyph}" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false" />
</MultiDataTrigger.Conditions>
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource ComboBox.Disabled.Background}" />
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource ComboBox.Disabled.Border}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true" />
</MultiDataTrigger.Conditions>
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource ComboBox.Disabled.Editable.Background}" />
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource ComboBox.Disabled.Editable.Border}" />
<Setter TargetName="splitBorder" Property="Background" Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}" />
<Setter TargetName="splitBorder" Property="BorderBrush" Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}" />
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
</Grid.ColumnDefinitions>
<!--<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
<ScrollViewer x:Name="DropDownScrollViewer">
@@ -187,46 +214,69 @@
</Border>
</theme:SystemDropShadowChrome>
</Popup>-->
<ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<Border x:Name="border" Background="{StaticResource TextBox.Static.Background}" Margin="{TemplateBinding BorderThickness}">
<TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="true">
<Setter Property="Foreground" Value="Black"/>
</Trigger>
<!--<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
<ToggleButton
x:Name="toggleButton"
Grid.ColumnSpan="2"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ComboBoxToggleButton}" />
<Border
x:Name="border"
Margin="{TemplateBinding BorderThickness}"
Background="{StaticResource TextBox.Static.Background}">
<TextBox
x:Name="PART_EditableTextBox"
Margin="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ComboBoxEditableTextBox}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="border" Property="Opacity" Value="0.56" />
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="true">
<Setter Property="Foreground" Value="Black" />
</Trigger>
<!--<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
<Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
<Setter Property="Color" TargetName="shadow" Value="#71000000"/>
</Trigger>-->
<Trigger Property="HasItems" Value="false">
<!--<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>-->
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true"/>
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
</MultiTrigger>
<!--<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
<Trigger Property="HasItems" Value="false">
<!--<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>-->
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true" />
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
</MultiTrigger>
<!--<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
</Trigger>-->
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
<!--<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
</Grid.ColumnDefinitions>
<Popup
x:Name="PART_Popup"
Grid.ColumnSpan="2"
Margin="1"
AllowsTransparency="true"
IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Placement="Bottom"
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
<!--<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
<ScrollViewer x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
@@ -238,156 +288,225 @@
</ScrollViewer>
</Border>
</theme:SystemDropShadowChrome>-->
</Popup>
<ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<ContentPresenter x:Name="contentPresenter" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
<!--<Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>-->
<!--<Setter Property="Color" TargetName="shadow" Value="#71000000"/>-->
</Trigger>
<Trigger Property="HasItems" Value="false">
<!--<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>-->
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true"/>
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
</MultiTrigger>
<!--<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
</Popup>
<ToggleButton
x:Name="toggleButton"
Grid.ColumnSpan="2"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ComboBoxToggleButton}" />
<ContentPresenter
x:Name="contentPresenter"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding SelectionBoxItem}"
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
IsHitTestVisible="false"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
<!--<Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>-->
<!--<Setter Property="Color" TargetName="shadow" Value="#71000000"/>-->
</Trigger>
<Trigger Property="HasItems" Value="false">
<!--<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>-->
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true" />
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
</MultiTrigger>
<!--<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
</Trigger>-->
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="BaseCrystalComboBoxStyle" TargetType="{x:Type ComboBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Padding" Value="6,3,5,3"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
<Style.Triggers>
<Trigger Property="IsEditable" Value="true">
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Padding" Value="2"/>
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="BaseComboBoxStyle" TargetType="ComboBox">
<Setter Property="IsEditable" Value="True"></Setter>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Trigger>
</Style.Triggers>
</Style>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="BaseCrystalComboBoxStyle" TargetType="{x:Type ComboBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
<Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}" />
<Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="Padding" Value="6,3,5,3" />
<Setter Property="ScrollViewer.CanContentScroll" Value="true" />
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="Template" Value="{StaticResource ComboBoxTemplate}" />
<Style.Triggers>
<Trigger Property="IsEditable" Value="true">
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="2" />
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="BaseComboBoxStyle" TargetType="ComboBox">
<Setter Property="IsEditable" Value="True" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="RoundedComboBox" TargetType="{x:Type ComboBox}">
<Setter Property="Width" Value="auto"></Setter>
<Setter Property="HorizontalAlignment" Value="Stretch"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource pageColorBrush}"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" Background="Transparent">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!--下拉箭头-->
<ToggleButton Grid.Column="1" ClickMode="Press" Focusable="False" Cursor="Hand"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Margin="2" MinWidth="0" MinHeight="0" Width="Auto">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="MinWidth" Value="0"/>
<Setter Property="MinHeight" Value="0"/>
<Setter Property="Width" Value="Auto"/>
<Setter Property="Height" Value="Auto"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="#00000000"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<DockPanel Background="{TemplateBinding Background}" LastChildFill="False" SnapsToDevicePixels="True">
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" DockPanel.Dock="Right" >
<Path Data="M0,0L3.5,4 7,0z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True"></Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<!--项内容-->
<ContentPresenter IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" VerticalAlignment="Center" Margin="3" HorizontalAlignment="Stretch" />
<TextBox x:Name="PART_EditableTextBox" HorizontalAlignment="Stretch" Focusable="True" Visibility="Collapsed" IsReadOnly="False"/>
<!--下拉显示面板HorizontalOffset:设置下拉面板的相对位置-->
<Popup HorizontalOffset="-1" Width="{TemplateBinding ActualWidth}"
IsOpen="{TemplateBinding IsDropDownOpen}" Focusable="False" PopupAnimation="Slide">
<Grid SnapsToDevicePixels="True" HorizontalAlignment="Stretch">
<Border BorderThickness="1,1,1,1" BorderBrush="{TemplateBinding BorderBrush}" HorizontalAlignment="Stretch" CornerRadius="0">
<Border.Background>
<SolidColorBrush Color="White" />
</Border.Background>
</Border>
<ScrollViewer SnapsToDevicePixels="True" HorizontalAlignment="Stretch" >
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" HorizontalAlignment="Stretch" />
</ScrollViewer>
</Grid>
</Popup>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="RoundedComboBox" TargetType="{x:Type ComboBox}">
<Setter Property="Width" Value="auto" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="{DynamicResource pageColorBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Border
Background="Transparent"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<!-- 下拉箭头 -->
<ToggleButton
Grid.Column="1"
Width="Auto"
MinWidth="0"
MinHeight="0"
Margin="2"
ClickMode="Press"
Cursor="Hand"
Focusable="False"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="Width" Value="Auto" />
<Setter Property="Height" Value="Auto" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="#00000000" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<DockPanel
Background="{TemplateBinding Background}"
LastChildFill="False"
SnapsToDevicePixels="True">
<Border
x:Name="Border"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
DockPanel.Dock="Right">
<Path
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,0L3.5,4 7,0z"
Fill="{TemplateBinding Foreground}" />
</Border>
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True" />
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<!-- 项内容 -->
<ContentPresenter
Margin="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
IsHitTestVisible="False" />
<TextBox
x:Name="PART_EditableTextBox"
HorizontalAlignment="Stretch"
Focusable="True"
IsReadOnly="False"
Visibility="Collapsed" />
<!-- 下拉显示面板HorizontalOffset:设置下拉面板的相对位置 -->
<Popup
Width="{TemplateBinding ActualWidth}"
Focusable="False"
HorizontalOffset="-1"
IsOpen="{TemplateBinding IsDropDownOpen}"
PopupAnimation="Slide">
<Grid HorizontalAlignment="Stretch" SnapsToDevicePixels="True">
<Border
HorizontalAlignment="Stretch"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1,1,1,1"
CornerRadius="0">
<Border.Background>
<SolidColorBrush Color="White" />
</Border.Background>
</Border>
<ScrollViewer HorizontalAlignment="Stretch" SnapsToDevicePixels="True">
<StackPanel
HorizontalAlignment="Stretch"
IsItemsHost="True"
KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Grid>
</Popup>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxTemplate1" TargetType="{x:Type ComboBox}">
<Border BorderBrush="Black" BorderThickness="1">
<ToggleButton x:Name="toggleButton" ClickMode="Press">
<!-- 自定义下拉按钮的外观 -->
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border Background="LightGray" BorderBrush="Gray" BorderThickness="1" Padding="5">
<Path Data="M0,0 L8,8 16,0z" Fill="Black" HorizontalAlignment="Right"/>
</Border>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<!-- 省略其他部分以保持简洁 -->
</Border>
</ControlTemplate>
<ControlTemplate x:Key="ComboBoxTemplate1" TargetType="{x:Type ComboBox}">
<Border BorderBrush="Black" BorderThickness="1">
<ToggleButton x:Name="toggleButton" ClickMode="Press">
<!-- 自定义下拉按钮的外观 -->
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border
Padding="5"
Background="LightGray"
BorderBrush="Gray"
BorderThickness="1">
<Path
HorizontalAlignment="Right"
Data="M0,0 L8,8 16,0z"
Fill="Black" />
</Border>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<!-- 省略其他部分以保持简洁 -->
</Border>
</ControlTemplate>
</ResourceDictionary>
+21 -22
View File
@@ -1,23 +1,22 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="BaseDataGridColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{DynamicResource ListHeadBackColorBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="BorderBrush" Value="{DynamicResource ListHeadBorderColorBrush}"/>
<Setter Property="BorderThickness" Value="1,0,0,0"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="BaseDataGridColumnHeaderLeftAlignmentStyle" TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{DynamicResource ListHeadBackColorBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="BorderBrush" Value="{DynamicResource ListHeadBorderColorBrush}"/>
<Setter Property="BorderThickness" Value="1,0,0,0"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="BaseDataGridColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{DynamicResource ListHeadBackColorBrush}" />
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="BorderBrush" Value="{DynamicResource ListHeadBorderColorBrush}" />
<Setter Property="BorderThickness" Value="1,0,0,0" />
<Setter Property="Padding" Value="5" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
<Style x:Key="BaseDataGridColumnHeaderLeftAlignmentStyle" TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{DynamicResource ListHeadBackColorBrush}" />
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="BorderBrush" Value="{DynamicResource ListHeadBorderColorBrush}" />
<Setter Property="BorderThickness" Value="1,0,0,0" />
<Setter Property="Padding" Value="5" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
</Style>
</ResourceDictionary>
+56 -48
View File
@@ -1,50 +1,58 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="BaseTextBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="BasePasswordBoxStyle" TargetType="PasswordBox">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="BaseRoundCornerTextBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border x:Name="border" CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="BaseTextBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="BasePasswordBoxStyle" TargetType="PasswordBox">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="BaseRoundCornerTextBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border
x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
SnapsToDevicePixels="True">
<ScrollViewer
x:Name="PART_ContentHost"
Focusable="False"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<!-- 去除高亮框 -->
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Trigger>
</Style.Triggers>
</Style>
<!--去除高亮框-->
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
+16 -17
View File
@@ -1,20 +1,19 @@
<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">
<Style x:Key="BaseWindowStyle" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource mainColorBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}"/>
<Setter Property="FontSize" Value="12"/>
<!-- 其他样式设置 -->
<Style x:Key="BaseWindowStyle" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource mainColorBrush}" />
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}" />
<Setter Property="FontSize" Value="12" />
<!-- 其他样式设置 -->
</Style>
<Style x:Key="BaseNoneBorderWindowStyle" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource mainColorBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource mainColorDarkBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="AllowsTransparency" Value="True"/>
</Style>
</Style>
<Style x:Key="BaseNoneBorderWindowStyle" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource mainColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource mainColorDarkBrush}" />
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontSize" Value="12" />
<Setter Property="WindowStyle" Value="None" />
<Setter Property="AllowsTransparency" Value="True" />
</Style>
</ResourceDictionary>
@@ -1,5 +1,10 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ImageBrush x:Key="imgBrushClose" ImageSource="/Resources/WindowBoxes/close.png" Stretch="Uniform"/>
<ImageBrush x:Key="imgBrushCloseHover" ImageSource="/Resources/WindowBoxes/close.hover.png" Stretch="Uniform"/>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ImageBrush
x:Key="imgBrushClose"
ImageSource="/Resources/WindowBoxes/close.png"
Stretch="Uniform" />
<ImageBrush
x:Key="imgBrushCloseHover"
ImageSource="/Resources/WindowBoxes/close.hover.png"
Stretch="Uniform" />
</ResourceDictionary>
+18 -19
View File
@@ -1,20 +1,19 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BitmapImage x:Key="main29WeixinIcon" UriSource="/Resources/main_29weixin_icon.png"/>
<BitmapImage x:Key="imgMin" UriSource="/Resources/WindowBoxes/min.png"/>
<BitmapImage x:Key="imgMinHover" UriSource="/Resources/WindowBoxes/min.hover.png"/>
<BitmapImage x:Key="imgNormal" UriSource="/Resources/WindowBoxes/normal.png"/>
<BitmapImage x:Key="imgNormalHover" UriSource="/Resources/WindowBoxes/normal.hover.png"/>
<BitmapImage x:Key="imgMax" UriSource="/Resources/WindowBoxes/max.png"/>
<BitmapImage x:Key="imgMaxHover" UriSource="/Resources/WindowBoxes/max.hover.png"/>
<BitmapImage x:Key="imgClose" UriSource="/Resources/WindowBoxes/close.png"/>
<BitmapImage x:Key="imgCloseHover" UriSource="/Resources/WindowBoxes/close.hover.png"/>
<BitmapImage x:Key="imgCloseGray" UriSource="/Resources/close_gray.png"/>
<BitmapImage x:Key="imgBaseMsgErr" UriSource="/Resources/BaseMsgErr.png"/>
<BitmapImage x:Key="imgBaseMsgInfo" UriSource="/Resources/BaseMsgInfo.png"/>
<BitmapImage x:Key="imgBaseMsgQue" UriSource="/Resources/BaseMsgQue.png"/>
<BitmapImage x:Key="imgOrderWeishopIcon" UriSource="/Resources/order_weishop_icon.png" />
<BitmapImage x:Key="imgErrPic" UriSource="/Resources/err_pic.png" />
<BitmapImage x:Key="imgLoadingPic" UriSource="/Resources/loading.png" />
<BitmapImage x:Key="imgBuyerOrder" UriSource="/Resources/buyer_order.png" />
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BitmapImage x:Key="main29WeixinIcon" UriSource="/Resources/main_29weixin_icon.png" />
<BitmapImage x:Key="imgMin" UriSource="/Resources/WindowBoxes/min.png" />
<BitmapImage x:Key="imgMinHover" UriSource="/Resources/WindowBoxes/min.hover.png" />
<BitmapImage x:Key="imgNormal" UriSource="/Resources/WindowBoxes/normal.png" />
<BitmapImage x:Key="imgNormalHover" UriSource="/Resources/WindowBoxes/normal.hover.png" />
<BitmapImage x:Key="imgMax" UriSource="/Resources/WindowBoxes/max.png" />
<BitmapImage x:Key="imgMaxHover" UriSource="/Resources/WindowBoxes/max.hover.png" />
<BitmapImage x:Key="imgClose" UriSource="/Resources/WindowBoxes/close.png" />
<BitmapImage x:Key="imgCloseHover" UriSource="/Resources/WindowBoxes/close.hover.png" />
<BitmapImage x:Key="imgCloseGray" UriSource="/Resources/close_gray.png" />
<BitmapImage x:Key="imgBaseMsgErr" UriSource="/Resources/BaseMsgErr.png" />
<BitmapImage x:Key="imgBaseMsgInfo" UriSource="/Resources/BaseMsgInfo.png" />
<BitmapImage x:Key="imgBaseMsgQue" UriSource="/Resources/BaseMsgQue.png" />
<BitmapImage x:Key="imgOrderWeishopIcon" UriSource="/Resources/order_weishop_icon.png" />
<BitmapImage x:Key="imgErrPic" UriSource="/Resources/err_pic.png" />
<BitmapImage x:Key="imgLoadingPic" UriSource="/Resources/loading.png" />
<BitmapImage x:Key="imgBuyerOrder" UriSource="/Resources/buyer_order.png" />
</ResourceDictionary>
+50 -38
View File
@@ -1,39 +1,51 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls">
<Style TargetType="{x:Type local:UcImageButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:UcImageButton}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<Grid Background="Transparent">
<Image x:Name="buttonImage" Source="{TemplateBinding ButtonImage}" Stretch="Uniform"/>
<Image x:Name="mouseOverButtonImage" Visibility="Collapsed" Source="{TemplateBinding MouseOverButtonImage}" Stretch="Uniform"/>
<Image x:Name="mousePressButtonImage" Visibility="Collapsed" Source="{TemplateBinding MousePressButtonImage}" Stretch="Uniform"/>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center">
</ContentPresenter>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Visibility" TargetName="buttonImage" Value="Collapsed"/>
<Setter Property="Visibility" TargetName="mouseOverButtonImage" Value="Visible"/>
<Setter Property="Visibility" TargetName="mousePressButtonImage" Value="Collapsed"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Visibility" TargetName="buttonImage" Value="Collapsed"/>
<Setter Property="Visibility" TargetName="mouseOverButtonImage" Value="Collapsed"/>
<Setter Property="Visibility" TargetName="mousePressButtonImage" Value="Visible"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls">
<Style TargetType="{x:Type local:UcImageButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:UcImageButton}">
<Border
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid Background="Transparent">
<Image
x:Name="buttonImage"
Source="{TemplateBinding ButtonImage}"
Stretch="Uniform" />
<Image
x:Name="mouseOverButtonImage"
Source="{TemplateBinding MouseOverButtonImage}"
Stretch="Uniform"
Visibility="Collapsed" />
<Image
x:Name="mousePressButtonImage"
Source="{TemplateBinding MousePressButtonImage}"
Stretch="Uniform"
Visibility="Collapsed" />
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="buttonImage" Property="Visibility" Value="Collapsed" />
<Setter TargetName="mouseOverButtonImage" Property="Visibility" Value="Visible" />
<Setter TargetName="mousePressButtonImage" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="buttonImage" Property="Visibility" Value="Collapsed" />
<Setter TargetName="mouseOverButtonImage" Property="Visibility" Value="Collapsed" />
<Setter TargetName="mousePressButtonImage" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
@@ -1,47 +1,64 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls">
<Style TargetType="{x:Type local:UcWaterMarkTextBox1}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="WaterMark" Value="请输入"/>
<Setter Property="Text" Value=""/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:UcWaterMarkTextBox1}">
<Border x:Name="border" CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<Grid>
<!--<ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>-->
<ScrollViewer x:Name="PART_ContentHost" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"></ScrollViewer>
<!--<TextBlock Text="{TemplateBinding WaterMark}" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls">
<Style TargetType="{x:Type local:UcWaterMarkTextBox1}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="WaterMark" Value="请输入" />
<Setter Property="Text" Value="" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:UcWaterMarkTextBox1}">
<Border
x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
SnapsToDevicePixels="True">
<Grid>
<!--<ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>-->
<ScrollViewer
x:Name="PART_ContentHost"
HorizontalScrollBarVisibility="Hidden"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalScrollBarVisibility="Hidden" />
<!--<TextBlock Text="{TemplateBinding WaterMark}" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
Visibility="{Binding ElementName=txtGoodsName,Path=Text,Converter={StaticResource NotHasTextVisibility}}"></TextBlock>-->
<!--<TextBlock Text="{TemplateBinding WaterMark}" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
<!--<TextBlock Text="{TemplateBinding WaterMark}" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
></TextBlock>-->
<!--<TextBlock Text="33333" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
<!--<TextBlock Text="33333" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
></TextBlock>-->
<TextBlock x:Name="tbWaterMark" Text="{TemplateBinding WaterMark}" Grid.Column="2" Margin="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
IsHitTestVisible="False" Foreground="LightGray" Visibility="Collapsed"></TextBlock>
</Grid>
</Border>
<!--<ControlTemplate.Triggers>
<TextBlock
x:Name="tbWaterMark"
Grid.Column="2"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="LightGray"
IsHitTestVisible="False"
Text="{TemplateBinding WaterMark}"
Visibility="Collapsed" />
</Grid>
</Border>
<!--<ControlTemplate.Triggers>
<Trigger Property="Text" Value="">
<Setter TargetName="tbWaterMark" Property="Visibility" Value="Visible"/>
</Trigger>
</ControlTemplate.Triggers>-->
</ControlTemplate>
</Setter.Value>
</Setter>
<!--去除高亮框-->
<!--<Style.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<!-- 去除高亮框 -->
<!--<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Trigger>
</Style.Triggers>-->
</Style>
</Style>
</ResourceDictionary>
@@ -1,321 +1,351 @@
<basewindows:BaseWindow
x:Class="_29WxOrderWpf.Windows.OrderWindows.TransitAfterSaleWindow"
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:buyerctrls="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_29WxOrderWpf.Windows.OrderWindows"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
Title="TransitAfterSaleWindow"
Width="600"
Height="650"
Loaded="TransitAfterSaleWindow_Loaded"
ResizeMode="NoResize"
Style="{StaticResource BaseNoneBorderWindowStyle}"
mc:Ignorable="d">
<Grid
x:Name="mainGrid"
Margin="2"
Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid x:Name="gridTitle">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image
Width="50"
Height="50"
Margin="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Source="{StaticResource main29WeixinIcon}" />
<Label
x:Name="lblAppName"
Grid.Column="1"
Margin="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="中转单售后"
FontSize="20"
Foreground="{StaticResource mainColorLightBrush}" />
</Grid>
<Border
Grid.Row="1"
Padding="40,20"
Background="White">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label
Grid.Row="1"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
仓库:
</Label>
<ComboBox
x:Name="cmbWareHouse"
Grid.Row="1"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
IsEnabled="False"
IsReadOnly="True"
SelectedIndex="0"
Style="{StaticResource RoundedComboBox}" />
x:Class="_29WxOrderWpf.Windows.OrderWindows.TransitAfterSaleWindow"
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:buyerctrls="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_29WxOrderWpf.Windows.OrderWindows"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
Title="TransitAfterSaleWindow"
Width="600"
Height="650"
Loaded="TransitAfterSaleWindow_Loaded"
ResizeMode="NoResize"
Style="{StaticResource BaseNoneBorderWindowStyle}"
mc:Ignorable="d">
<Grid
x:Name="mainGrid"
Margin="2"
Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid x:Name="gridTitle">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image
Width="50"
Height="50"
Margin="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Source="{StaticResource main29WeixinIcon}" />
<Label
x:Name="lblAppName"
Grid.Column="1"
Margin="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="中转单售后"
FontSize="20"
Foreground="{StaticResource mainColorLightBrush}" />
</Grid>
<Border
Grid.Row="1"
Padding="40,20"
Background="White">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label
Grid.Row="1"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
仓库:
</Label>
<ComboBox
x:Name="cmbWareHouse"
Grid.Row="1"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
IsEnabled="False"
IsReadOnly="True"
SelectedIndex="0"
Style="{StaticResource RoundedComboBox}" />
<Label
Grid.Row="2"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
物流公司:
</Label>
<TextBox
x:Name="txtExpressName"
Grid.Row="2"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
IsReadOnly="True"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="2"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
物流公司:
</Label>
<TextBox
x:Name="txtExpressName"
Grid.Row="2"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
IsReadOnly="True"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="3"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
物流单号:
</Label>
<TextBox
x:Name="txtWarehouseWaybill"
Grid.Row="3"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
IsReadOnly="True"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="3"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
物流单号:
</Label>
<TextBox
x:Name="txtWarehouseWaybill"
Grid.Row="3"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
IsReadOnly="True"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="4"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
地址解析:
</Label>
<TextBox
x:Name="txtAddressAnalysis"
Grid.Row="4"
Grid.Column="1"
Height="80"
Margin="0,0,0,25"
Padding="0,4"
VerticalAlignment="Top"
VerticalContentAlignment="Top"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
TextWrapping="Wrap" />
<Button
x:Name="btnAddressAnalysis"
Grid.Row="4"
Grid.Column="1"
Height="28"
MinWidth="48"
Margin="4,29"
Padding="4"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="btnAddressAnalysis_Click"
Content="解 析"
Style="{StaticResource BasePageButtonStyle}" />
<Label
Grid.Row="4"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
地址解析:
</Label>
<TextBox
x:Name="txtAddressAnalysis"
Grid.Row="4"
Grid.Column="1"
Height="80"
Margin="0,0,0,25"
Padding="0,4"
VerticalAlignment="Top"
VerticalContentAlignment="Top"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
TextWrapping="Wrap" />
<Button
x:Name="btnAddressAnalysis"
Grid.Row="4"
Grid.Column="1"
Height="28"
MinWidth="48"
Margin="4,29"
Padding="4"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="btnAddressAnalysis_Click"
Content="解 析"
Style="{StaticResource BasePageButtonStyle}" />
<Label
Grid.Row="5"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
收件人:
</Label>
<TextBox
x:Name="txtUser"
Grid.Row="5"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="5"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
收件人:
</Label>
<TextBox
x:Name="txtUser"
Grid.Row="5"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="6"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
联系电话:
</Label>
<TextBox
x:Name="txtMobile"
Grid.Row="6"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="6"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
联系电话:
</Label>
<TextBox
x:Name="txtMobile"
Grid.Row="6"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="7"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
省/市/区:
</Label>
<Grid Grid.Row="7" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBox
x:Name="txtProvince"
Grid.Row="0"
Grid.Column="0"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<TextBox
x:Name="txtCity"
Grid.Row="0"
Grid.Column="1"
Height="28"
Margin="2,0,2,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<TextBox
x:Name="txtCounty"
Grid.Row="0"
Grid.Column="2"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</Grid>
<Label
Grid.Row="7"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
省/市/区:
</Label>
<Grid Grid.Row="7" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBox
x:Name="txtProvince"
Grid.Row="0"
Grid.Column="0"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<TextBox
x:Name="txtCity"
Grid.Row="0"
Grid.Column="1"
Height="28"
Margin="2,0,2,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<TextBox
x:Name="txtCounty"
Grid.Row="0"
Grid.Column="2"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</Grid>
<Label
Grid.Row="8"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
详细地址:
</Label>
<TextBox
x:Name="txtDetailAddress"
Grid.Row="8"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Label
Grid.Row="8"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="14">
详细地址:
</Label>
<TextBox
x:Name="txtDetailAddress"
Grid.Row="8"
Grid.Column="1"
Height="28"
Margin="0,0,0,25"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
BorderBrush="{StaticResource pageColorBrush}"
BorderThickness="1"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
<Button
x:Name="btnWorkOrder"
Grid.Row="9"
Grid.Column="0"
Height="28"
MinWidth="48"
Margin="0,0,0,0"
Padding="4"
HorizontalAlignment="Center"
VerticalAlignment="Top"
d:Visibility="Visible"
Click="btnWorkOrder_Click"
Content="提交工单"
Style="{StaticResource BasePageButtonStyle}"
Visibility="Collapsed" />
<Button
x:Name="btnAdd"
Grid.Row="9"
Grid.Column="1"
MinWidth="48"
Padding="4"
HorizontalAlignment="Left"
Click="btnAdd_Click"
Content="添 加"
Style="{StaticResource BasePageButtonStyle}" />
<Label
x:Name="lblMsg"
Grid.Row="9"
Grid.Column="1"
Margin="70,0,0,0"
Foreground="{StaticResource PageWarningBrushCC}" />
<Label
x:Name="lblWorkOrderMsg"
Grid.Row="11"
Grid.Column="1"
Margin="-6,0,0,0"
d:Content="已提交工单"
Foreground="{StaticResource pageColorBrush}" />
</Grid>
</Border>
<userctrls:UcWindowBoxes
x:Name="ucWindowBox"
Margin="4"
HorizontalAlignment="Right"
VerticalAlignment="Top"
MaxBoxVisibility="Visible" />
</Grid>
<Button
x:Name="btnWorkOrder"
Grid.Row="9"
Grid.Column="0"
Height="28"
MinWidth="48"
Margin="0,0,0,0"
Padding="4"
HorizontalAlignment="Center"
VerticalAlignment="Top"
d:Visibility="Visible"
Click="btnWorkOrder_Click"
Content="提交工单"
Style="{StaticResource BasePageButtonStyle}"
Visibility="Collapsed" />
<Button
x:Name="btnAdd"
Grid.Row="9"
Grid.Column="1"
MinWidth="48"
Padding="4"
HorizontalAlignment="Left"
Click="btnAdd_Click"
Content="添 加"
IsEnabled="False"
Style="{StaticResource BasePageButtonStyle}" />
<Image
x:Name="imgLoading"
Grid.Row="9"
Grid.Column="1"
Width="20"
Height="20"
Margin="48,0,0,0"
HorizontalAlignment="Left"
IsEnabled="False"
Source="{StaticResource imgLoadingPic}">
<Image.RenderTransform>
<RotateTransform Angle="45" CenterX="10" CenterY="10" />
</Image.RenderTransform>
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="imgLoading"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
From="0"
To="360"
Duration="0:0:3" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
<Label
x:Name="lblMsg"
Grid.Row="9"
Grid.Column="1"
Margin="70,0,0,0"
Foreground="{StaticResource PageWarningBrushCC}" />
<Label
x:Name="lblWorkOrderMsg"
Grid.Row="11"
Grid.Column="1"
Margin="-6,0,0,0"
d:Content="已提交工单"
Foreground="{StaticResource pageColorBrush}" />
</Grid>
</Border>
<userctrls:UcWindowBoxes
x:Name="ucWindowBox"
Margin="4"
HorizontalAlignment="Right"
VerticalAlignment="Top"
MaxBoxVisibility="Visible" />
</Grid>
</basewindows:BaseWindow>
@@ -45,8 +45,9 @@ namespace _29WxOrderWpf.Windows.OrderWindows
}
private async void TransitAfterSaleWindow_Loaded(object sender, RoutedEventArgs e)
{
foreach (var warehouse in TransitWarehouseData.TransitWarehouseList)
{
btnAdd.IsEnabled = true;
foreach (var warehouse in TransitWarehouseData.TransitWarehouseList)
{
this.cmbWareHouse.Items.Add(warehouse.TransName);
}
@@ -71,12 +72,29 @@ namespace _29WxOrderWpf.Windows.OrderWindows
}
else
{
if (!string.IsNullOrEmpty(OrderItem.ItemTransitOrderWithVoid?.out_order_no) && OrderItem.PddBuyerAfterSaleAddressStr.IsNullOrEmpty() &&
OrderItem.TransitRefundStatusStr.Contains("需手动申请售后") || OrderItem.TransitRefundStatusStr.Contains("待用户发货"))
{
btnAdd.IsEnabled = false;
imgLoading.Visibility = Visibility.Visible;
await MainWindow.Instance.orderListCtrl.DoBuyerRefend(new List<oms_wei_order_item_info>() { OrderItem });
var order = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == OrderItem.order_id);
if (order != null)
{
var orderItemTmp = order.orderItems.FirstOrDefault(oi => oi.sku_id == OrderItem.sku_id);
if (orderItemTmp != null)
OrderItem = orderItemTmp;
}
btnAdd.IsEnabled = true;
}
if (OrderItem.PddBuyerAfterSale?.orderSn == OrderItem.ItemTransitOrder?.out_order_no && !string.IsNullOrEmpty(OrderItem.PddBuyerAfterSale?.afterSaleAddress))
{
txtAddressAnalysis.Text = OrderItem.PddBuyerAfterSale?.afterSaleAddress;
btnAddressAnalysis_Click(null, null);
}
}
imgLoading.Visibility = Visibility.Collapsed;
var workOrderInfo = await GetWorkOrder();
var issueType = BaseRegex.GetStringJson(ref workOrderInfo, "issueType");
@@ -234,6 +252,9 @@ namespace _29WxOrderWpf.Windows.OrderWindows
public string AddWorkOrder()
{
if (OrderItem.ItemTransitOrder?.warehouse_status == 3)
return "\"success\":true,\"message\":\"已到仓,无需拦截工单\"";
string url = HttpResponseTransitWorkOrderBLL.WorkOrderUrl + "/api/open/v1/customer-work-orders/intercept-return-cloud-warehouse-after-outbound";
JObject obj = new JObject();
obj["appId"] = this.OrderItem.Shop.ShopId;
+1 -1
View File
@@ -36,7 +36,7 @@ namespace AllBase
/// 版本ID
/// </summary>
public static int VersionCount = 263;
public static int VersionCount = 265;
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
public static string DebugUrl { get; set; } = "http://localhost:9000";
+31 -9
View File
@@ -169,6 +169,12 @@ namespace AllBase.Model.DBModel
set { }
}
public string RefundTypeStr
{
get { return this.GetValue(x => x.RefundTypeStr); }
set { this.SetValue(x => x.RefundTypeStr, value); }
}
public DateTime RefundDatetime
{
@@ -313,11 +319,13 @@ namespace AllBase.Model.DBModel
{
get
{
if (order_id == "3738523900304581376")
if (order_id == "3738634560083228416")
{
}
return this.out_express_no + ((this.out_shipped != 2 || string.IsNullOrEmpty(this.out_express_no)) ? "" : " ×");
if (this.out_shipped == 2 && !string.IsNullOrEmpty(this.out_express_no))
return this.out_express_no + " ×";
return this.out_express_no;
}
set { }
}
@@ -675,6 +683,13 @@ namespace AllBase.Model.DBModel
else
OrderBuyType = "";
if (this.orderItems.Any(oi => oi.ItemRefund?.type == "REFUND"))
this.RefundTypeStr = "仅退款";
else if (this.orderItems.Any(oi => oi.ItemRefund?.type == "RETURN"))
this.RefundTypeStr = "退货退款";
else if (this.orderItems.Any(oi => oi.ItemRefund?.type == "REFUND") && this.orderItems.Any(oi => oi.ItemRefund?.type == "RETURN"))
this.RefundTypeStr = "仅退款/退货退款";
IsWaitBuy = GetIsWaitBuy();
IsWaitSend = GetIsWaitSend();
IsWaitReceive = GetIsWaitReceive();
@@ -712,6 +727,11 @@ namespace AllBase.Model.DBModel
private bool GetIsWaitSend()
{
if (order_id == "3738622310043515392")
{
}
if (status != 20 && status != 21)
return false;
if (refundItems?.Any(r => r.IsRefund) == true)
@@ -723,19 +743,19 @@ namespace AllBase.Model.DBModel
return false;
// 店铺未发货,外采已采购
// out_after_sale_status 新拍订单也不会变,内存里直接根据退款单修改掉
if (!orderItems.All(oi => oi.ItemTransitOrder != null) && purchase_status != 1 && (string.IsNullOrEmpty(out_order_no) || out_after_sale_status == "退款成功"))
if (!orderItems.All(oi => oi.ItemTransitOrder != null) && purchase_status != 1 &&
(string.IsNullOrEmpty(out_order_no) || out_after_sale_status == "退款成功"))
return false;
return true;
}
private bool GetIsWaitReceive()
{
if (order_id == "3738687160199289344")
if (order_id == "3738622310043515392")
{
}
if (refundItems?.Any(r => r.IsRefund) == true)
return false;
if (orderItems?.Any(oi => oi.refund_status > 1) == true)
@@ -747,10 +767,12 @@ namespace AllBase.Model.DBModel
public bool GetIsAbnormal()
{
if (order_id == "3738000949931831296")
{
}
// 如果有售后,直接作为售后单处理
if (orderItems.All(oi => oi.refund_status > 1))
return false;
// 直发或者云改直已购买且未退货,从异常单移除
if (orderItems.All(oi => oi.DirectPddBuyerOrder != null && oi.DirectPddBuyerAfterSale == null) /*&& (out_shipped != 2 || string.IsNullOrEmpty(this.out_express_no))*/)
return false;
if (orderItems.Any(oi => !(oi.OrderItemExt?.abnormal_text).IsNullOrEmpty()))
return true;
@@ -10,10 +10,9 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
>
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="txt-fapiao">&#xed35;</sys:String>