<UserControl x:Class="BDU.Views.CommandTreeView"
             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:BDU.Views"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             mc:Ignorable="d"
             Loaded="UserControl_Loaded"
             d:DesignHeight="450"
             d:DesignWidth="800">
    <Grid>
        <GroupBox Header="指令">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <StackPanel Grid.Row="0"
                            Orientation="Horizontal"
                            Margin="10,0,7,12"
                            VerticalAlignment="Center">
                    <TextBox x:Name="SearchTextBox"
                             MinWidth="150"
                             Height="25"
                             Margin="0,0,5,0"
                             VerticalContentAlignment="Center"
                             KeyDown="SearchTextBox_KeyDown"
                             TextChanged="SearchTextBox_TextChanged" />
                </StackPanel>

                <TreeView Grid.Row="1"
                          x:Name="InstructionTreeView"
                          MouseDoubleClick="InstructionTreeView_MouseDoubleClick">
                    <TreeView.ContextMenu>
                        <ContextMenu>
                            <MenuItem Header="重新加载"
                                      Click="RelodCommand_Click" />
                        </ContextMenu>
                    </TreeView.ContextMenu>
                </TreeView>
            </Grid>
        </GroupBox>
    </Grid>
</UserControl>
