<dx:ThemedWindow x:Class="VIZ.Package.Module.SaveProjectWindow"
                 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:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                 xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
                 xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                 xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
                 xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
                 xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
                 xmlns:domain="clr-namespace:VIZ.Package.Domain;assembly=VIZ.Package.Domain"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:local="clr-namespace:VIZ.Package.Module"
                 d:DataContext="{d:DesignInstance Type=local:SaveProjectWindowModel}" 
                 mc:Ignorable="d" WindowStartupLocation="CenterScreen"
                 Title="项目管理" Height="600" Width="800">

    <Grid Margin="0,10,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="60"></RowDefinition>
        </Grid.RowDefinitions>
        <local:ProjectTreePanel x:Name="projectTreePanel">
            <local:ProjectTreePanel.FolderContextMenu>
                <ContextMenu>
                    <dxmvvm:Interaction.Behaviors>
                        <dxmvvm:EventToCommand EventName="Opened" Command="{Binding Path=PlacementTarget.DataContext.FolderContentMenuOpendCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"></dxmvvm:EventToCommand>
                    </dxmvvm:Interaction.Behaviors>
                    <MenuItem Header="新建" Command="{Binding Path=PlacementTarget.DataContext.CreateFolderCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
                    <MenuItem Header="删除" Command="{Binding Path=PlacementTarget.DataContext.DeleteFolderCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"></MenuItem>
                    <Separator/>
                    <MenuItem Header="刷新" Command="{Binding Path=PlacementTarget.DataContext.RefreshFolderCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"></MenuItem>
                </ContextMenu>
            </local:ProjectTreePanel.FolderContextMenu>
            <local:ProjectTreePanel.FileContextMenu>
                <ContextMenu>
                    <dxmvvm:Interaction.Behaviors>
                        <dxmvvm:EventToCommand EventName="Opened" Command="{Binding Path=PlacementTarget.DataContext.FileContentMenuOpendCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"></dxmvvm:EventToCommand>
                    </dxmvvm:Interaction.Behaviors>
                    <MenuItem Header="删除" Command="{Binding Path=PlacementTarget.DataContext.DeleteFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"></MenuItem>
                    <Separator/>
                    <MenuItem Header="刷新" Command="{Binding Path=PlacementTarget.DataContext.RefreshFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"></MenuItem>
                </ContextMenu>
            </local:ProjectTreePanel.FileContextMenu>
        </local:ProjectTreePanel>

        <!-- 按钮组 -->
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="2*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center">
                <TextBlock Text="项目名：" Margin="20,0,0,0" VerticalAlignment="Center"></TextBlock>
                <dxe:TextEdit Width="400" Margin="20,0,0,0" EditValue="{Binding Path=ProjectName,Mode=TwoWay}"></dxe:TextEdit>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="1">
                <Button Width="80" Height="40" Content="保存项目" Margin="20,0,20,0" Command="{Binding Path=SaveProjectCommand}"></Button>
            </StackPanel>
        </Grid>
    </Grid>

</dx:ThemedWindow>