<UserControl x:Class="VIZ.Package.Module.CustomVideoEditPanel"
             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:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
             xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
             xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
             xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
             xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
             xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
             xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
             xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
             xmlns:local="clr-namespace:VIZ.Package.Module"
             d:Background="White"
             d:DataContext="{d:DesignInstance Type=local:CustomVideoEditPanelModel}" 
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="60"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="40"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="120"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Text="值:" Margin="0,0,10,0" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
            <dxe:TextEdit Grid.Column="1" Height="30" EditValue="{Binding Path=Path}" IsReadOnly="True"></dxe:TextEdit>
            <Button Grid.Column="2" Width="80" Height="30" Content="本地文件" Command="{Binding OpenLocalFileCommand}"></Button>
        </Grid>

        <dx:DXTabControl Grid.Row="1">
            <dx:DXTabItem Header="媒资库" Visibility="{Binding IShowMedia,Mode=TwoWay}">
                <!-- 媒体资源面板 -->
                <local:MediaResourcePanel x:Name="mhResourcePanel">
                    <local:MediaResourcePanel.FolderContextMenu>
                        <ContextMenu>
                            <MenuItem Header="刷新" Command="{Binding Path=PlacementTarget.DataContext.RefreshFolderCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
                        </ContextMenu>
                    </local:MediaResourcePanel.FolderContextMenu>
                    <local:MediaResourcePanel.FileContextMenu>
                        <ContextMenu>
                            <MenuItem Header="刷新" Command="{Binding Path=PlacementTarget.DataContext.RefreshFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
                        </ContextMenu>
                    </local:MediaResourcePanel.FileContextMenu>
                </local:MediaResourcePanel>
            </dx:DXTabItem>
        </dx:DXTabControl>

    </Grid>
</UserControl>