<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="1000">
    <dx:ThemedWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/VIZ.Package.Module.Resource;component/Style/Button/Button_Default.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </dx:ThemedWindow.Resources>

    <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="60"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="120"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Text="项目名：" Margin="20,0,0,0" VerticalAlignment="Center"></TextBlock>
            <dxe:TextEdit Height="30" Margin="20,0,0,0" Grid.Column="1" EditValue="{Binding Path=ProjectName,Mode=TwoWay}"></dxe:TextEdit>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="2">
                <Button Width="80" Height="30" Content="保存项目" Margin="20,0,20,0" Command="{Binding Path=SaveProjectCommand}" Style="{StaticResource Button_Main}"></Button>
            </StackPanel>
        </Grid>
    </Grid>

</dx:ThemedWindow>