649 lines
38 KiB
Plaintext
Raw Normal View History

2025-08-15 15:38:37 +08:00
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2025-09-04 18:28:02 +08:00
xmlns:CustomControl="clr-namespace:SWS.CustomControl;assembly=SWS.CustomControl"
xmlns:cvt="clr-namespace:SWS.Commons.Helper.Converter;assembly=SWS.Commons"
xmlns:local="clr-namespace:SWS.CustomControl;assembly=SWS.CustomControl"
xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
2025-09-04 18:28:02 +08:00
xmlns:sys="clr-namespace:System;assembly=mscorlib"
2025-08-15 15:38:37 +08:00
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<!-- 系统颜色 -->
<SolidColorBrush x:Key="ColorPrimary" Color="#026BE3" />
<SolidColorBrush x:Key="ColorSecond" Color="#02ADFF" />
<SolidColorBrush x:Key="ColorOther" Color="#DBE0E4" />
<!-- style放后面单纯的属性放前面否则解析顺序不对 -->
<!-- modalwindow -->
<Style x:Key="CustomWindowStyle" TargetType="Window">
<Setter Property="AllowsTransparency" Value="True" />
<Setter Property="Background" Value="White" />
<Setter Property="ResizeMode" Value="NoResize" />
<Setter Property="WindowStyle" Value="None" />
</Style>
<!-- 系统按钮风格 -->
<Style x:Key="sysBtn" TargetType="Button">
<Setter Property="Width" Value="65" />
<Setter Property="Height" Value="26" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="{StaticResource ColorSecond}" />
<Style.Triggers>
<!-- 鼠标滑过时的背景颜色和前景颜色 -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" Value="Red" />
<!-- 高亮背景色 -->
2025-09-04 18:28:02 +08:00
<Setter Property="Foreground" Value="Black" />
</DataTrigger>
<DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false">
<!-- 高亮背景色 -->
2025-08-15 15:38:37 +08:00
<Setter Property="Foreground" Value="Black" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="sysBtn2" TargetType="Button">
<Setter Property="Width" Value="65" />
<Setter Property="Height" Value="26" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="{StaticResource ColorOther}" />
<Style.Triggers>
<!-- 鼠标滑过时的背景颜色和前景颜色 -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" Value="Red" />
<!-- 高亮背景色 -->
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="sysBtn3" TargetType="Button">
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="40" />
<Setter Property="Margin" Value="5,2,5,2" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="{StaticResource ColorOther}" />
<Style.Triggers>
<!-- 鼠标滑过时的背景颜色和前景颜色 -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" Value="{StaticResource ColorOther}" />
<!-- 高亮背景色 -->
</DataTrigger>
</Style.Triggers>
</Style>
2025-09-04 18:28:02 +08:00
<Style x:Key="sysBtn4" TargetType="Button">
<Setter Property="Width" Value="65" />
<Setter Property="Height" Value="26" />
<Setter Property="Margin" Value="5,2,5,2" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="#F5222D" />
<Style.Triggers>
<!-- 鼠标滑过时的背景颜色和前景颜色 -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" Value="Black" />
<!-- 高亮背景色 -->
<Setter Property="Foreground" Value="Black" />
</DataTrigger>
</Style.Triggers>
</Style>
2025-08-15 15:38:37 +08:00
<!-- 系统textblock -->
<Style x:Key="sysLabel" TargetType="TextBlock">
<Setter Property="Height" Value="20" />
<Setter Property="Margin" Value="0,5,0,0" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<!-- 系统textbox -->
<Style x:Key="sysTextBox" TargetType="TextBox">
<Setter Property="Height" Value="24" />
<Setter Property="Margin" Value="5,5,5,0" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style x:Key="sysTextAreaInfo" TargetType="TextBox">
<Setter Property="Height" Value="100" />
<Setter Property="Width" Value="300" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="AcceptsReturn" Value="True" />
<Setter Property="Margin" Value="10,5,10,5" />
<Setter Property="Padding" Value="0" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
</Style>
<!-- 全局 RadFilePathPicker 样式 -->
<Style x:Key="sysFilePathPicker" TargetType="telerik:RadFilePathPicker">
<Setter Property="Height" Value="24" />
<Setter Property="Margin" Value="5,0,5,0" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<!-- 图标按钮 -->
<Style TargetType="{x:Type local:IconButton}">
<Setter Property="Padding" Value="5" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:IconButton}">
<Grid>
<!-- 背景层 -->
<Border
x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="3" />
<DockPanel>
<!-- 图标层 -->
<Path
x:Name="PART_Icon"
Width="{TemplateBinding IconSize}"
Height="{TemplateBinding IconSize}"
Margin="{TemplateBinding IconMargin}"
Data="{TemplateBinding IconData}"
DockPanel.Dock="{TemplateBinding IconPlacement}"
Fill="{TemplateBinding Foreground}"
Stretch="Uniform" />
<!-- 内容层 -->
<ContentPresenter
x:Name="PART_Content"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RecognizesAccessKey="True" />
</DockPanel>
</Grid>
<ControlTemplate.Triggers>
<!-- 鼠标悬停效果 -->
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" />
</Trigger>
<!-- 按下效果 -->
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 多选搜索 Combox Start -->
<ExponentialEase x:Key="ExponentialEaseOut" EasingMode="EaseOut" />
<DropShadowEffect
x:Key="PopupShadowDepth"
BlurRadius="12"
Opacity="0.1"
ShadowDepth="2"
Color="Transparent" />
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
<Border Background="{TemplateBinding Background}" Focusable="False">
<ScrollViewer
x:Name="PART_ContentHost"
Background="Transparent"
Focusable="False"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" />
</Border>
</ControlTemplate>
<Color x:Key="PlaceholderTextColor" po:Freeze="True">#C0C4CC</Color>
<Geometry x:Key="ChevronDownGeometry" po:Freeze="True">M998 352c0 -8 -4 -17 -10 -23l-50 -50c-6 -6 -14 -10 -23 -10c-8 0 -17 4 -23 10l-393 393l-393 -393c-6 -6 -15 -10 -23 -10s-17 4 -23 10l-50 50c-6 6 -10 15 -10 23s4 17 10 23l466 466c6 6 15 10 23 10s17 -4 23 -10l466 -466c6 -6 10 -15 10 -23z</Geometry>
<ControlTemplate x:Key="ComboBoxToggleButton1" TargetType="{x:Type ToggleButton}">
<Border
x:Name="PART_Border"
Padding="6,1.2"
BorderThickness="0"
SnapsToDevicePixels="true">
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="30" />
</Grid.ColumnDefinitions>
<Rectangle
Grid.Column="1"
Width="30"
Height="Auto"
Margin="0,1"
Fill="{TemplateBinding Background}" />
<Path
x:Name="PART_Arrow"
Grid.Column="1"
Width="10"
Height="6"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="{StaticResource ChevronDownGeometry}"
RenderTransformOrigin=".5,.5"
Stretch="Fill">
<Path.Fill>
<SolidColorBrush Color="{DynamicResource PlaceholderTextColor}" />
</Path.Fill>
<Path.RenderTransform>
<RotateTransform Angle="0" />
</Path.RenderTransform>
</Path>
</Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver" />
<VisualState x:Name="Pressed" />
<VisualState x:Name="Disabled" />
</VisualStateGroup>
<VisualStateGroup x:Name="CheckStates">
<VisualState x:Name="Checked">
<Storyboard>
<DoubleAnimation
EasingFunction="{StaticResource ExponentialEaseOut}"
Storyboard.TargetName="PART_Arrow"
Storyboard.TargetProperty="(Path.RenderTransform).(RotateTransform.Angle)"
To="-180"
Duration="00:00:.3" />
</Storyboard>
</VisualState>
<VisualState x:Name="Unchecked">
<Storyboard>
<DoubleAnimation
EasingFunction="{StaticResource ExponentialEaseOut}"
Storyboard.TargetName="PART_Arrow"
Storyboard.TargetProperty="(Path.RenderTransform).(RotateTransform.Angle)"
To="0"
Duration="00:00:.3" />
</Storyboard>
</VisualState>
<VisualState x:Name="Indeterminate" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Border>
</ControlTemplate>
<Style x:Key="DefaultListBox" TargetType="{x:Type ListBox}">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border
x:Name="Border"
Margin="{TemplateBinding Margin}"
Padding="0,0,0,.1"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
SnapsToDevicePixels="True">
<ScrollViewer Clip="{Binding RelativeSource={RelativeSource AncestorType=local:WDBorder}, Path=ContentClip}" Focusable="False">
<VirtualizingStackPanel IsItemsHost="True" />
</ScrollViewer>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsGrouping" Value="True">
<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DefaultMultiSelectComboBoxItem" TargetType="{x:Type local:MultiSelectComboBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource RegularTextSolidColorBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Height" Value="34" />
<Setter Property="Margin" Value="1,0" />
<Setter Property="Padding" Value="6,0" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:MultiSelectComboBoxItem}">
<Border
x:Name="PART_Border"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true">
<CheckBox
Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
<ContentPresenter
x:Name="PART_ContentPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
TextElement.Foreground="{TemplateBinding Foreground}" />
</CheckBox>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource DefaultBackgroundSolidColorBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:MultiSelectSearchComboBox}">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="BorderBrush" Value="{DynamicResource BaseSolidColorBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="{DynamicResource BackgroundSolidColorBrush}" />
<Setter Property="Padding" Value="14.5,3,30,3" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:MultiSelectSearchComboBox}">
<ControlTemplate.Resources>
<Storyboard x:Key="OpenStoryboard">
<DoubleAnimation
EasingFunction="{StaticResource ExponentialEaseOut}"
Storyboard.TargetName="PART_DropDown"
Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)"
To="1"
Duration="00:00:.2" />
</Storyboard>
<Storyboard x:Key="CloseStoryboard">
<DoubleAnimation
EasingFunction="{StaticResource ExponentialEaseOut}"
Storyboard.TargetName="PART_DropDown"
Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)"
To="0"
Duration="00:00:.2" />
</Storyboard>
</ControlTemplate.Resources>
<Border
Name="PART_Border"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
SnapsToDevicePixels="True">
<Grid Grid.IsSharedSizeScope="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" SharedSizeGroup="ComboBoxButton" />
</Grid.ColumnDefinitions>
<TextBox
Name="PART_EditableTextBox"
Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Panel.ZIndex="1"
Background="Transparent"
Focusable="True"
Foreground="{DynamicResource PrimaryTextSolidColorBrush}"
IsReadOnly="True"
SelectionBrush="{DynamicResource WindowBorderBrushSolidColorBrush}"
Style="{x:Null}"
Template="{StaticResource ComboBoxTextBox}"
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
<TextBlock
x:Name="PART_Watermark"
Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Background="Transparent"
FontSize="{TemplateBinding FontSize}"
Foreground="{DynamicResource RegularTextSolidColorBrush}"
IsHitTestVisible="False"
Text="{Binding Path=(local:ElementHelper.Watermark), RelativeSource={RelativeSource TemplatedParent}}"
TextTrimming="CharacterEllipsis"
Visibility="Collapsed" />
<ToggleButton
x:Name="PART_ToggleButton"
Grid.ColumnSpan="2"
Panel.ZIndex="2"
Background="{TemplateBinding Background}"
ClickMode="Release"
Focusable="False"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Style="{x:Null}"
Template="{StaticResource ComboBoxToggleButton1}" />
<Popup
x:Name="PART_Popup"
AllowsTransparency="True"
IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
Placement="Bottom"
PlacementTarget="{Binding ElementName=PART_Border}"
StaysOpen="False">
<local:SmallPanel
x:Name="PART_DropDown"
MinWidth="{TemplateBinding FrameworkElement.ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
Margin="24,2,24,24"
RenderTransformOrigin=".5,0"
SnapsToDevicePixels="True">
<local:SmallPanel.RenderTransform>
<ScaleTransform ScaleY="0" />
</local:SmallPanel.RenderTransform>
<Border
Name="PART_DropDownBorder"
Background="White"
BorderBrush="Blue"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
Effect="{StaticResource PopupShadowDepth}"
SnapsToDevicePixels="True"
UseLayoutRounding="True" />
<Grid Margin="0,8" ClipToBounds="False">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBox
x:Name="PART_TextBox"
Height="{Binding ElementName=PART_EditableTextBox, Path=Height}"
Margin="6,0"
local:ElementHelper.CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
local:ElementHelper.IsClear="True"
local:ElementHelper.Watermark="{Binding SearchWatermark, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
FontSize="{Binding ElementName=PART_EditableTextBox, Path=FontSize}" />
<CheckBox
x:Name="PART_SelectAll"
Grid.Row="1"
Margin="4"
local:ElementHelper.CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
Content="{TemplateBinding SelectAllContent}"
Visibility="{TemplateBinding IsSelectAllActive}" />
<local:MultiSelectListBox
x:Name="PART_Selector"
Grid.Row="2"
Margin="1,0"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
local:ElementHelper.CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="0"
DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
ItemContainerStyle="{StaticResource DefaultMultiSelectComboBoxItem}"
ItemsSource="{TemplateBinding ItemsSource}"
ScrollViewer.CanContentScroll="{Binding ScrollViewer.CanContentScroll, RelativeSource={RelativeSource TemplatedParent}}"
ScrollViewer.HorizontalScrollBarVisibility="{Binding ScrollViewer.HorizontalScrollBarVisibility, RelativeSource={RelativeSource TemplatedParent}}"
SelectedValuePath="{TemplateBinding SelectedValuePath}"
SelectionMode="Multiple"
Style="{StaticResource DefaultListBox}" />
<local:MultiSelectListBox
x:Name="PART_SearchSelector"
Grid.Row="2"
Margin="1,0"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
local:ElementHelper.CornerRadius="{Binding Path=(local:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="0"
DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
ItemContainerStyle="{StaticResource DefaultMultiSelectComboBoxItem}"
ItemsSource="{TemplateBinding ItemsSourceSearch}"
ScrollViewer.CanContentScroll="{Binding ScrollViewer.CanContentScroll, RelativeSource={RelativeSource TemplatedParent}}"
ScrollViewer.HorizontalScrollBarVisibility="{Binding ScrollViewer.HorizontalScrollBarVisibility, RelativeSource={RelativeSource TemplatedParent}}"
SelectedValuePath="{TemplateBinding SelectedValuePath}"
SelectionMode="Multiple"
Style="{StaticResource DefaultListBox}"
Visibility="Collapsed" />
</Grid>
</local:SmallPanel>
</Popup>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger SourceName="PART_ToggleButton" Property="IsChecked" Value="True">
<Trigger.EnterActions>
<BeginStoryboard x:Name="BeginStoryboardOpenStoryboard" Storyboard="{StaticResource OpenStoryboard}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<StopStoryboard BeginStoryboardName="BeginStoryboardOpenStoryboard" />
</Trigger.ExitActions>
</Trigger>
<Trigger SourceName="PART_ToggleButton" Property="IsChecked" Value="False">
<Trigger.EnterActions>
<BeginStoryboard x:Name="BeginStoryboardCloseStoryboard" Storyboard="{StaticResource CloseStoryboard}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<StopStoryboard BeginStoryboardName="BeginStoryboardCloseStoryboard" />
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="PART_Border" Property="BorderBrush" Value="{DynamicResource PrimaryNormalSolidColorBrush}" />
</Trigger>
<Trigger SourceName="PART_Popup" Property="AllowsTransparency" Value="True">
<Setter TargetName="PART_DropDownBorder" Property="Margin" Value="0,2,0,0" />
</Trigger>
<Trigger Property="Text" Value="">
<Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsSelectAllActive" Value="False">
<Setter TargetName="PART_TextBox" Property="Margin" Value="6,2" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 多选搜索 Combox End -->
2025-09-04 18:28:02 +08:00
<!-- 信号状态样式 -->
2025-09-04 18:28:02 +08:00
<Style x:Key="ToDeleteStatusStyle" TargetType="telerik:GridViewRow">
<Setter Property="Foreground" Value="#db9fa9" />
<Setter Property="Background" Value="Transparent" />
</Style>
<Style x:Key="NewStatusStyle" TargetType="telerik:GridViewRow">
<Setter Property="Foreground" Value="#fc7c2c" />
<Setter Property="Background" Value="Transparent" />
</Style>
<Style x:Key="UsedStatusStyle" TargetType="telerik:GridViewRow">
<Setter Property="Foreground" Value="#49ac64" />
<Setter Property="Background" Value="Transparent" />
</Style>
<Style x:Key="ConfirmedStatusStyle" TargetType="telerik:GridViewRow">
2025-09-09 08:58:50 +08:00
<Setter Property="Foreground" Value="Black" />
2025-09-04 18:28:02 +08:00
<Setter Property="Background" Value="Transparent" />
</Style>
<Style x:Key="ReopenStatusStyle" TargetType="telerik:GridViewRow">
<Setter Property="Foreground" Value="#1c3df5" />
<Setter Property="Background" Value="Transparent" />
</Style>
<Style x:Key="deletedStatusStyle" TargetType="telerik:GridViewRow">
<Setter Property="Foreground" Value="DarkGray" />
<Setter Property="Background" Value="Transparent" />
</Style>
<cvt:StatusToColourConverter x:Key="converter" />
<CustomControl:ConditionalStyleSelector x:Key="selector" ConditionConverter="{StaticResource converter}">
<CustomControl:ConditionalStyleSelector.Rules>
<CustomControl:ConditionalStyleRule Style="{StaticResource ToDeleteStatusStyle}">
<CustomControl:ConditionalStyleRule.Value>
<sys:String>ToDelete</sys:String>
</CustomControl:ConditionalStyleRule.Value>
</CustomControl:ConditionalStyleRule>
<CustomControl:ConditionalStyleRule Style="{StaticResource NewStatusStyle}">
<CustomControl:ConditionalStyleRule.Value>
<sys:String>New</sys:String>
</CustomControl:ConditionalStyleRule.Value>
</CustomControl:ConditionalStyleRule>
<CustomControl:ConditionalStyleRule Style="{StaticResource UsedStatusStyle}">
<CustomControl:ConditionalStyleRule.Value>
<sys:String>Used</sys:String>
</CustomControl:ConditionalStyleRule.Value>
</CustomControl:ConditionalStyleRule>
<CustomControl:ConditionalStyleRule Style="{StaticResource ConfirmedStatusStyle}">
<CustomControl:ConditionalStyleRule.Value>
<sys:String>Confirmed</sys:String>
</CustomControl:ConditionalStyleRule.Value>
</CustomControl:ConditionalStyleRule>
<CustomControl:ConditionalStyleRule Style="{StaticResource ReopenStatusStyle}">
<CustomControl:ConditionalStyleRule.Value>
<sys:String>Reopen</sys:String>
</CustomControl:ConditionalStyleRule.Value>
</CustomControl:ConditionalStyleRule>
<CustomControl:ConditionalStyleRule Style="{StaticResource deletedStatusStyle}">
<CustomControl:ConditionalStyleRule.Value>
<sys:String>deleted</sys:String>
</CustomControl:ConditionalStyleRule.Value>
</CustomControl:ConditionalStyleRule>
</CustomControl:ConditionalStyleSelector.Rules>
</CustomControl:ConditionalStyleSelector>
2025-08-15 15:38:37 +08:00
</ResourceDictionary>