<UserControl x:Class="JianGongYun.Views.TeachingInfo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
              xmlns:viewmodel="clr-namespace:JianGongYun.ViewModel.ModuleViewModel"
            xmlns:Metro="clr-namespace:AduSkin.Controls.Metro;assembly=AduSkin"
        xmlns:local="clr-namespace:JianGongYun.Views"
        mc:Ignorable="d" 
             d:DesignHeight="700" d:DesignWidth="900">
    <UserControl.DataContext>
        <viewmodel:PracticalCaseViewModel/>
    </UserControl.DataContext>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="250"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Border Background="#FFF" BorderThickness="0,0,1,0" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>
                <Canvas x:Name="CanvasContent">
                    <ListBox Height="{Binding ElementName=CanvasContent,Path=ActualHeight}" ItemsSource="{Binding AllControlViewSource.View}" BorderThickness="0" Background="#2F3035" SelectedItem="{Binding CurrentShowControl}">
                        <ListBox.Resources>
                            <Style TargetType="ListBoxItem">
                                <Setter Property="Background" Value="Transparent" />
                                <Setter Property="BorderThickness" Value="0" />
                                <Setter Property="Padding" Value="0" />
                                <Setter Property="Cursor" Value="Hand"/>
                            </Style>
                        </ListBox.Resources>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Border MinHeight="40" Width="245" Background="#00000000" x:Name="Bd" BorderBrush="#2F3035" BorderThickness="0 1 0 0">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Text="{Binding Title}"  Foreground="White"  Margin="20,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                                    </Grid>
                                </Border>
                                <DataTemplate.Triggers>
                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"  Value="True">
                                        <Setter TargetName="Bd" Property="Background" Value="#3E7FFF" />
                                    </DataTrigger>
                                    <MultiTrigger>
                                        <MultiTrigger.Conditions>
                                            <Condition Property="IsMouseOver" Value="True" />
                                        </MultiTrigger.Conditions>
                                        <Setter TargetName="Bd" Property="Background" Value="WhiteSmoke" />
                                    </MultiTrigger>
                                </DataTemplate.Triggers>
                            </DataTemplate>

                        </ListBox.ItemTemplate>
                    </ListBox>
                    <!--测试按钮-->
                    <Metro:AduFlatButton Content="直播窗口测试弹出" Click="LiveTest_Click" Canvas.Bottom="100" Canvas.Left="77"></Metro:AduFlatButton>
                    <!--测试按钮结束-->
                </Canvas>
            </Grid>
        </Border>
        <Grid  Grid.Column="1">
            <Border  Margin="0"  Height="Auto" Width="Auto" CornerRadius="6" >
                <Grid>
                    <Grid.RowDefinitions >
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <ContentPresenter Grid.Row="0" Height="Auto" Content="{Binding Content}"/>
                </Grid>
            </Border>
        </Grid>
    </Grid>
</UserControl>
