<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                    
                    xmlns:controls="clr-namespace:AIStudio.Wpf.Mind.Controls"
                    xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Themes/MindNode.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ComboBox.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="AIStudio.Styles.MindEditor" TargetType="{x:Type controls:MindEditor}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:MindEditor}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <!-- ToolBox Control -->
                        <ContentControl x:Name="PART_ContentControl" Template="{Binding ToolBox,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>

                        <!-- Diagram Control -->
                        <dd:DiagramControl Grid.Row="1" x:Name="PART_DiagramControl"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="AIStudio.Styles.MindEditor.Default" TargetType="{x:Type controls:MindEditor}" BasedOn="{StaticResource AIStudio.Styles.MindEditor}">
        <Setter Property="ToolBox">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <controls:ToolBoxControl />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type controls:MindEditor}" BasedOn="{StaticResource AIStudio.Styles.MindEditor.Default}" />
</ResourceDictionary>
