From f08871fe7d148d667f2f11f80f64de71a0d9504c Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 15 六月 2026 18:19:37 +0800
Subject: [PATCH] 优化标准老化界面
---
HMI.UI/Controls/MultiCombox.xaml | 65 +++++++++++++++++++++++++++-----
1 files changed, 55 insertions(+), 10 deletions(-)
diff --git a/HMI.UI/Controls/MultiCombox.xaml b/HMI.UI/Controls/MultiCombox.xaml
index c098596..abd39b2 100644
--- a/HMI.UI/Controls/MultiCombox.xaml
+++ b/HMI.UI/Controls/MultiCombox.xaml
@@ -1,10 +1,55 @@
-锘�<UserControl x:Class="HMI.UI.Controls.MultiCombox"
- 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:HMI.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <ComboBox ></ComboBox>
-</UserControl>
+锘�<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="clr-namespace:HMI.UI">
+ <Style TargetType="local:MultiComboBox" BasedOn="{StaticResource FormComboxStyle}">
+ <Setter Property="ItemTemplate">
+ <Setter.Value>
+ <DataTemplate DataType="util:ItemData">
+ <StackPanel Orientation="Horizontal">
+ <CheckBox IsChecked="{Binding IsChecked,UpdateSourceTrigger=PropertyChanged}">
+ <!--<CheckBox.Style>
+ <Style TargetType="CheckBox">
+ <Setter Property="Background" Value="White" />
+ <Setter Property="BorderBrush" Value="#FF262E34"/>
+ <Setter Property="Foreground" Value="#FF262E34"/>
+ <Setter Property="BorderThickness" Value="1"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type CheckBox}">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" >
+ <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" Width="15" Height="15">
+ --><!-- your color here --><!--
+ <Path Stretch="Uniform" Width="15" Height="10" Fill="Black" Name="eliCheck" Data="F1 M 9.97498,1.22334L 4.6983,9.09834L 4.52164,9.09834L 0,5.19331L 1.27664,3.52165L 4.255,6.08833L 8.33331,1.52588e-005L 9.97498,1.22334 Z " Visibility="Collapsed"/>
+ </Border>
+ <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"></TextBlock>
+ </StackPanel>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter Property="Background" Value="LightGray" />
+ </Trigger>
+ <Trigger Property="IsPressed" Value="True">
+ <Setter Property="Background" Value="#FF9C9E9F" />
+ </Trigger>
+ --><!--<Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Background" Value="LightGray" />
+ <Setter Property="Foreground" Value="Gray" />
+ <Setter Property="BorderBrush" Value="Gray"/>
+ <Setter TargetName="eliCheck" Property="Opacity" Value="0.5" />
+ </Trigger>--><!--
+ <Trigger Property="IsChecked" Value="True">
+ <Setter TargetName="eliCheck" Property="Visibility" Value="Visible"></Setter>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </CheckBox.Style>-->
+ </CheckBox>
+ <TextBlock Text="{Binding DisplayName}" />
+ </StackPanel>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary>
\ No newline at end of file
--
Gitblit v1.9.1