<dx:ThemedWindow x:Class="VIZ.Package.Module.OpenProjectWindow"
                 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:OpenProjectWindowModel}" 
                 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>

        <!-- 按钮组 -->
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Grid.ColumnSpan="2">
            <Button Width="80" Height="40" Content="打开项目" Margin="20,0,20,0" Command="{Binding Path=OpenProjectCommand}"></Button>
        </StackPanel>
    </Grid>

</dx:ThemedWindow>