<UserControl x:Class="VIZ.Package.Module.MainView"
             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:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
             xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
             xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
             xmlns:dxdove="http://schemas.devexpress.com/winfx/2008/xaml/docking/visualelements"
             xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
             xmlns:plugin="clr-namespace:VIZ.Package.Plugin;assembly=VIZ.Package.Plugin"
             xmlns:domain="clr-namespace:VIZ.Package.Domain;assembly=VIZ.Package.Domain"
             xmlns:local="clr-namespace:VIZ.Package.Module" 
             IsEnabled="{Binding Path=IsEnabled}"
             d:DataContext="{d:DesignInstance Type=local:MainViewModel}" 
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>

        <fcore:Bool2BoolConverter x:Key="Bool2BoolConverter"></fcore:Bool2BoolConverter>

        <DataTemplate DataType="{x:Type domain:PluginInfo}">
            <plugin:PluginLoader ViewType="{Binding ViewType,Mode=OneWay}"></plugin:PluginLoader>
        </DataTemplate>

        <!--<Style x:Key="CaptionImageStyle" TargetType="dxdove:CaptionImage">
            <Setter Property="Width" Value="20"/>
            <Setter Property="Height" Value="20"/>
            <Setter Property="Stretch" Value="Fill"/>
        </Style>-->

        <Style TargetType="{x:Type dxdo:LayoutPanel}">
            <Setter Property="FloatOnDoubleClick" Value="False"></Setter>
            <Setter Property="BindableName" Value="{Binding ID}" />
            <Setter Property="Caption" Value="{Binding Name}" />
            <Setter Property="MinHeight" Value="60"></Setter>
            <Setter Property="ShowCloseButton" Value="True"></Setter>
            <Setter Property="Closed" Value="{Binding Path=IsClosed,Mode=TwoWay}"></Setter>
        </Style>
        <Style TargetType="{x:Type dxdo:DocumentPanel}">
            <Setter Property="FloatOnDoubleClick" Value="False"></Setter>
            <Setter Property="BindableName" Value="{Binding ID}" />
            <Setter Property="Caption" Value="{Binding Name}" />
            <Setter Property="MinHeight" Value="40"></Setter>
            <Setter Property="ShowCloseButton" Value="True"></Setter>
            <Setter Property="Closed" Value="{Binding Path=IsClosed,Mode=TwoWay}"></Setter>
        </Style>
    </UserControl.Resources>

    <dxmvvm:Interaction.Behaviors>
        <dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
    </dxmvvm:Interaction.Behaviors>

    <dxdo:DockLayoutManager x:Name="dockLayoutManager" FloatingMode="Desktop" EnableWin32Compatibility="True"
                            ViewStyle="Light"
                            AutoHideExpandMode="MouseDown">
        <dxdo:LayoutGroup ItemsSource="{Binding ItemsSource}"></dxdo:LayoutGroup>
    </dxdo:DockLayoutManager>

</UserControl>
