alielie
2025-03-23 40014e6e41f1ec017a07b7a620b3c700807d0519
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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"
             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="/HMI.UI;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>