<UserControl x:Class="Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree.TreeView"
             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:s="https://github.com/canton7/Stylet"
             xmlns:converters="clr-namespace:Artemis.UI.Converters"
             xmlns:dd="urn:gong-wpf-dragdrop"
             xmlns:tree="clr-namespace:Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree"
             xmlns:local="clr-namespace:Artemis.UI.Screens.ProfileEditor.LayerProperties"
             mc:Ignorable="d"
             d:DesignHeight="450" d:DesignWidth="800"
             d:DataContext="{d:DesignInstance {x:Type tree:TreeViewModel}}">
    <ItemsControl ItemsSource="{Binding LayerPropertyGroups}"
                  VirtualizingStackPanel.IsVirtualizing="True"
                  VirtualizingStackPanel.VirtualizationMode="Recycling"
                  HorizontalContentAlignment="Stretch"
                  HorizontalAlignment="Stretch"
                  Background="{DynamicResource MaterialDesignToolBarBackground}"
                  dd:DragDrop.IsDragSource="True"
                  dd:DragDrop.IsDropTarget="True"
                  dd:DragDrop.DropHandler="{Binding LayerPropertiesViewModel}">
        <ItemsControl.ItemTemplate>
            <HierarchicalDataTemplate DataType="{x:Type local:LayerPropertyGroupViewModel}" ItemsSource="{Binding Children}">
                <ContentControl s:View.Model="{Binding TreeGroupViewModel}" />
            </HierarchicalDataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
</UserControl>