From 375b488be2666cd56e70728624f4eadaefee0440 Mon Sep 17 00:00:00 2001
From: chenghaoran <chenghaoran@ipilotwhale.com>
Date: 星期二, 12 三月 2024 17:36:49 +0800
Subject: [PATCH] 优化项目结构;
---
WPFProject/Style/CommonTree.xaml | 100 +++++++++++++++++++++++++-------------------------
1 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/Style/CommonTree.xaml b/WPFProject/Style/CommonTree.xaml
similarity index 99%
rename from Style/CommonTree.xaml
rename to WPFProject/Style/CommonTree.xaml
index b85aa19..7055e27 100644
--- a/Style/CommonTree.xaml
+++ b/WPFProject/Style/CommonTree.xaml
@@ -1,51 +1,51 @@
-锘�<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-
- xmlns:hc="https://handyorg.github.io/handycontrol"
- >
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
- </ResourceDictionary.MergedDictionaries>
-
- <Style TargetType="TreeViewItem" BasedOn="{StaticResource TreeViewItemBaseStyle}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TreeViewItem">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition MinHeight="{TemplateBinding MinHeight}"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Border x:Name="Bd" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
- <DockPanel LastChildFill="True" Margin="{Binding Converter={StaticResource TreeViewItemMarginConverter}, RelativeSource={RelativeSource TemplatedParent}}">
- <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
- <ContentPresenter VerticalAlignment="Center" x:Name="PART_Header" ContentSource="Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </DockPanel>
- </Border>
- <ItemsPresenter Grid.Row="1" x:Name="ItemsHost" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true" SourceName="Bd">
- <Setter Property="Background" TargetName="Bd" Value="{StaticResource SecondaryImportant}"/>
- </Trigger>
- <Trigger Property="IsExpanded" Value="false">
- <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
- </Trigger>
- <Trigger Property="HasItems" Value="false">
- <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
- </Trigger>
- <Trigger Property="IsSelected" Value="true">
- <Setter Property="Background" TargetName="Bd" Value="{StaticResource Important}"/>
- <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
- </Trigger>
-
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Opacity" Value=".4" />
- </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:hc="https://handyorg.github.io/handycontrol"
+ >
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+
+ <Style TargetType="TreeViewItem" BasedOn="{StaticResource TreeViewItemBaseStyle}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="TreeViewItem">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition MinHeight="{TemplateBinding MinHeight}"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Border x:Name="Bd" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
+ <DockPanel LastChildFill="True" Margin="{Binding Converter={StaticResource TreeViewItemMarginConverter}, RelativeSource={RelativeSource TemplatedParent}}">
+ <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
+ <ContentPresenter VerticalAlignment="Center" x:Name="PART_Header" ContentSource="Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+ </DockPanel>
+ </Border>
+ <ItemsPresenter Grid.Row="1" x:Name="ItemsHost" />
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsMouseOver" Value="true" SourceName="Bd">
+ <Setter Property="Background" TargetName="Bd" Value="{StaticResource SecondaryImportant}"/>
+ </Trigger>
+ <Trigger Property="IsExpanded" Value="false">
+ <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
+ </Trigger>
+ <Trigger Property="HasItems" Value="false">
+ <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
+ </Trigger>
+ <Trigger Property="IsSelected" Value="true">
+ <Setter Property="Background" TargetName="Bd" Value="{StaticResource Important}"/>
+ <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
+ </Trigger>
+
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Opacity" Value=".4" />
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
</ResourceDictionary>
\ No newline at end of file
--
Gitblit v1.9.1