alielie
2025-08-25 c4a3f8db90530a727ffab77c3bb5bb7d782792bf
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
<UserControl x:Class="Plugin.TestBuilder.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:Plugin.TestBuilder"
             xmlns:pw="https://opensource.panuon.com/wpf"
             xmlns:pu="https://opensource.panuon.com/wpf-ui"
             xmlns:dd="urn:gong-wpf-dragdrop"
             xmlns:m="clr-namespace:Plugin.TestBuilder.Model"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <pu:StyleDictionary Includes="TreeView"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
 
    <Grid>
        <TabControl>
            <TabItem Header="函数列表">
                <StackPanel>
                    <!--<hc:SearchBar hc:InfoElement.Placeholder="输入文本查询"  Style="{StaticResource SearchBarPlus}" Margin="10,5,10,5"/>-->
                    <TreeView ItemsSource="{Binding FuncModels}"
                              Style="{StaticResource DefaultTreeView}"
                              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>