<UserControl x:Class="Outline.OutlineWindow"
             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:out="clr-namespace:Outline"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ContextMenu x:Key="ContextMenu">
            <MenuItem Header="コピー" Command="Copy"/>
            <MenuItem Header="切り取り" Command="Cut"/>
            <MenuItem Header="上に貼り付け" Command="{x:Static out:OutlineCommands.PasteToUpper}"/>
            <MenuItem Header="下に貼り付け" Command="{x:Static out:OutlineCommands.PasteToLower}"/>
            <MenuItem Header="子として貼り付け" Command="{x:Static out:OutlineCommands.PasteAsChild}"/>
            <MenuItem Header="レベルを上げる" Command="{x:Static out:OutlineCommands.UpLevel}"/>
            <MenuItem Header="レベルを下げる" Command="{x:Static out:OutlineCommands.DownLevel}"/>
        </ContextMenu>
    </UserControl.Resources>
    <StackPanel>
        <ComboBox Name="ComboBox"
                  ItemsSource="{Binding AnalyzeTypeCollection}"/>
        <TreeView Name="TreeView"
                  ContextMenu="{StaticResource ContextMenu}">
            <TreeView.ItemContainerStyle>
                <Style TargetType="{x:Type TreeViewItem}">
                    <EventSetter Event="TreeViewItem.DragOver"  Handler="treeView_DragOver"/>
                    <EventSetter Event="TreeViewItem.Drop" Handler="treeView_Drop"/>
                    <EventSetter Event="TreeViewItem.MouseMove" Handler="treeView_MouseMove"/>
                    <EventSetter Event="TreeViewItem.MouseDoubleClick" Handler="treeView_MouseDoubleClick"/>
                </Style>
            </TreeView.ItemContainerStyle>
        </TreeView>
    </StackPanel>
</UserControl>
