<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.MindEditorView"
             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:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
             xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Themes/MindNode.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
      
        <dd:MindEditor  Data="{Binding Data}" 
                                    GetDataFunc="{Binding GetDataFunc,Mode=OneWayToSource}">
        </dd:MindEditor>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <TextBox Text="{Binding InputData}" 
                             TextWrapping="Wrap" 
                             AcceptsReturn="True"
                             VerticalScrollBarVisibility="Auto" 
                             Height="50"/>
            <Button Grid.Column="1" Content="加载数据" Command="{Binding SetDataCommand}"/>
            <Button Grid.Column="2" Content="获取数据" Command="{Binding GetDataCommand}"/>
            <TextBox Grid.Column="3" Text="{Binding OutputData}" 
                             TextWrapping="Wrap" 
                             AcceptsReturn="True"
                             VerticalScrollBarVisibility="Auto" 
                             Height="50"/>

        </Grid>
        <controls:TitleControl Grid.RowSpan="2"/>
    </Grid>
</UserControl>
