From 8d344c1b64a4b88fa78a46c0825f5d71c557a815 Mon Sep 17 00:00:00 2001
From: chr <chrry550@163.com>
Date: 星期五, 01 三月 2024 15:31:14 +0800
Subject: [PATCH] 优化DataGridUI;完善拖拽;
---
UI/Test/FunctionSetting.xaml | 88 +++++++++++++++++++++++++++-----------------
1 files changed, 54 insertions(+), 34 deletions(-)
diff --git a/UI/Test/FunctionSetting.xaml b/UI/Test/FunctionSetting.xaml
index 4b4334d..6347066 100644
--- a/UI/Test/FunctionSetting.xaml
+++ b/UI/Test/FunctionSetting.xaml
@@ -1,34 +1,54 @@
-锘�<UserControl x:Class="WPFProject.UI.Test.FunctionSetting"
- 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:WPFProject.UI.Test"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
- </ResourceDictionary.MergedDictionaries>
-
- <Style TargetType="Label"></Style>
- <Style TargetType="ListView"></Style>
-
- </ResourceDictionary>
- </UserControl.Resources>
-
- <Grid>
- <TabControl>
- <TabItem Header="鍑芥暟鍒楄〃">
- <TreeView>
- <TreeViewItem></TreeViewItem>
- </TreeView>
- </TabItem>
- <TabItem Header="鍙橀噺鍒楄〃">
- </TabItem>
- </TabControl>
- </Grid>
-</UserControl>
+锘�<UserControl x:Class="WPFProject.UI.Test.FunctionSetting"
+ 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:WPFProject.UI.Test"
+ xmlns:dd="urn:gong-wpf-dragdrop"
+
+ xmlns:m="clr-namespace:WPFProject.Models"
+ xmlns:util="clr-namespace:WPFProject.Utils"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
+ mc:Ignorable="d"
+ d:DesignHeight="450" d:DesignWidth="800">
+ <UserControl.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
+ <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/CommonTree.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/MainTab.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+ <Style TargetType="Label"/>
+
+ <Style TargetType="TabControl"/>
+ <Style TargetType="TreeView">
+ </Style>
+ </ResourceDictionary>
+ </UserControl.Resources>
+
+ <Grid>
+ <TabControl Style="{StaticResource ControlStyle}">
+ <TabItem Header="鍑芥暟鍒楄〃">
+ <StackPanel>
+ <hc:SearchBar hc:InfoElement.Placeholder="杈撳叆鏂囨湰鏌ヨ" Style="{StaticResource SearchBarPlus}" Margin="10,5,10,5"/>
+ <TreeView BorderThickness="0" ItemsSource="{Binding FuncModels}"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
+ dd:DragDrop.UseDefaultDragAdorner="True"
+ dd:DragDrop.DragHandler="{Binding dragHandler}"
+ >
+ <TreeView.ItemTemplate>
+ <HierarchicalDataTemplate DataType="{x:Type m:FuncModel}" ItemsSource="{Binding Path=Children}">
+ <ContentControl Content="{Binding Name}"/>
+ </HierarchicalDataTemplate>
+ </TreeView.ItemTemplate>
+ </TreeView>
+ </StackPanel>
+ </TabItem>
+ <TabItem Header="鍙橀噺鍒楄〃">
+ </TabItem>
+ </TabControl>
+ </Grid>
+</UserControl>
--
Gitblit v1.9.1