<UserControl x:Class=" VIZ.TVP.CBA.Module.RoundMatchView"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                      xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                      xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
                      xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
                      xmlns:dxrudex="http://schemas.devexpress.com/winfx/2008/xaml/reports/userdesignerextensions"
                      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                      xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
                      xmlns:storage="clr-namespace:VIZ.TVP.CBA.Module"
             mc:Ignorable="d"
             d:DesignHeight="800" d:DesignWidth="650">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/VIZ.TVP.CBA.Module;component/Style/DataGrid.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
            <core:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:HighLightEnum}"></core:Enum2EnumDescriptionConverter>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="650">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="175"/>
                    <ColumnDefinition Width="65"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="130"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="标题：" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Center" />

                <dxe:TextEdit Grid.Column="1"   Width="170" FontSize="16"   HorizontalContentAlignment="Left"
                         HorizontalAlignment="Left" VerticalAlignment="Center"  Text="{Binding Title,Mode=TwoWay }"></dxe:TextEdit>
                <TextBlock Grid.Column="2" Text="轮次："  FontSize="16" VerticalAlignment="Center"/>

                <dxe:ComboBoxEdit Grid.Column="3"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"
                          Width="120" ItemsSource="{Binding Path=RoundMatchs,Mode=TwoWay}" 
                          SelectedItem="{Binding Path=RoundMatchItem,Mode=TwoWay}">
                </dxe:ComboBoxEdit>
                
                <dx:SimpleButton  Grid.Row="0" Grid.Column="5" Content="加载数据"   FontSize="16" 
                                          Command="{Binding BtnCmd}" HorizontalContentAlignment="Center" Width="95" Height="30" />

            </Grid>
        </WrapPanel>

        <!--<DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
                      ItemsSource="{Binding Path=RoundMatchData}" Grid.Row="1" Background="Black"  RowHeaderWidth="0" >
            <DataGrid.ColumnHeaderStyle>
                <Style TargetType="DataGridColumnHeader">
                    <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
                    <Setter Property="Background" Value="Black"></Setter>
                    <Setter Property="Foreground" Value="White"></Setter>
                    <Setter Property="BorderThickness" Value="1"></Setter>
                    <Setter Property="FontSize" Value="20"/>
                </Style>
            </DataGrid.ColumnHeaderStyle>

            <DataGrid.Columns>
                <DataGridComboBoxColumn Header="" Width="100" x:Name="com_data1"
                                      
                                        SelectedItemBinding="{Binding Path=Light,Mode=TwoWay,Converter={StaticResource Enum2EnumDescriptionConverter}}"
                                        ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumDescriptions}}"
                                        CellStyle="{StaticResource  DataGirdView_UI}" >
                </DataGridComboBoxColumn>
                <DataGridTextColumn Header="日期" Width="*" Binding="{Binding Path=dates}" CellStyle="{StaticResource  DataGirdView_UI}" ></DataGridTextColumn>
                <DataGridTextColumn Header="时间" Width="*" Binding="{Binding Path=time}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="主队" Width="*" Binding="{Binding Path=HomeTeamName}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="主队得分" Width="*" Binding="{Binding Path=HomeTeamScore}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="客队" Width="*" Binding="{Binding Path=VisitingTeamName}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="客队得分" Width="*" Binding="{Binding Path=VisitingTeamScore}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="比赛状态" Width="*" Binding="{Binding Path=Status}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
            </DataGrid.Columns>

        </DataGrid>-->



        <DockPanel  Grid.Row="1">

            <ScrollViewer HorizontalScrollBarVisibility="Disabled"
                      VerticalScrollBarVisibility="Auto"
                      Name="PART_Options"
                      DockPanel.Dock="Right"
                      dx:ScrollBarExtensions.ScrollBarMode="TouchOverlap"
                      Focusable="False">

            </ScrollViewer>
            <dxg:GridControl x:Name="grid" ShowBorder="False" ItemsSource="{Binding Path= RoundMatchData,Mode=TwoWay}">

                <dxg:GridColumn FieldName="SelectLight"  Header="" Width="112">
                    <dxg:GridColumn.EditSettings>
                        <dxe:ComboBoxEditSettings 
                                        ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumDescriptions}}" IsTextEditable="False" />
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>
                <dxg:GridColumn FieldName="dates"  Header="日期" Width="112"  />
                <dxg:GridColumn FieldName="time"  Header="时间" Width="112"    />
                <dxg:GridColumn FieldName="HomeTeamName" Header="主队" Width="180" />
                <dxg:GridColumn FieldName="HomeTeamScore" Header="主队得分" Width="180"   />
                <dxg:GridColumn FieldName="VisitingTeamName" Header="客队" Width="180" />
                <dxg:GridColumn FieldName="VisitingTeamScore" Header="客队得分" Width="180"  />
                <dxg:GridColumn FieldName="Status"  Header="比赛状态" Width="180"  />

                <!--<dxg:GridColumn FieldName="ModelTrademarkName" Header="高亮" Width="112">
                            <dxg:GridColumn.EditSettings>
                                <dxe:ComboBoxEditSettings  IsTextEditable="False" />
                            </dxg:GridColumn.EditSettings>
                        </dxg:GridColumn>-->

                <!--#endregion-->
                <dxg:GridControl.View>
                    <dxg:TableView AutoWidth="True"  ShowGroupPanel="False" 
                               BorderThickness="0"  
                               ShowFilterPanelMode="Never" 
                               AllowColumnFiltering="False"
                               AllowSorting="False"
                               IsColumnMenuEnabled="False"  >
                    </dxg:TableView>
                </dxg:GridControl.View>
            </dxg:GridControl>
        </DockPanel>


    </Grid>


</UserControl>
