<UserControl x:Class="VIZ.TVP.CBA.Module.TeamStandingView"
                      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>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="650" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="120"/>
                </Grid.ColumnDefinitions>

                <TextBlock Grid.Column="0" Text="标题：" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Center"/>

                <dxe:TextEdit Grid.Column="1"   Width="120"  FontSize="16"   HorizontalContentAlignment="Center" 
                         HorizontalAlignment="Left" VerticalAlignment="Center"  Text="{Binding Title,Mode=TwoWay }"></dxe:TextEdit>
                <!--<TextBlock  TextBlock.TextAlignment="Center" Text="球队排行榜" Grid.Column="0" Foreground="White" FontSize="20"  Background="Black" Margin="100,0,3,0" Grid.ColumnSpan="2" />-->
                <Button Grid.Column="3" Content="加载数据"  FontSize="14" Width="95"  Height="30" Command="{Binding BtnCmd}" />
                <!--<Button Grid.Column="4" Content="数据上"  FontSize="14"  Width="95"  Height="30" Command="{Binding BtnCmdTeamStandingUp}" />
                <Button Grid.Column="5" Content="下一页数据"  FontSize="14"  Width="95" Height="30" Command="{Binding BtnCmdNextPage}" />-->


            </Grid>
        </WrapPanel>

        <!--<DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
                      ItemsSource="{Binding Path=TeamRanksModel}" 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>
                <DataGridTextColumn Header="排名序号" Width="*" Binding="{Binding Path=Id}" CellStyle="{StaticResource  DataGirdView_UI}" ></DataGridTextColumn>
                <DataGridTextColumn Header="球队名" Width="*" Binding="{Binding Path=TeamCNAlias}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="胜" Width="*" Binding="{Binding Path=Wins}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="负" Width="*" Binding="{Binding Path=Losses}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="胜率" Width="*" Binding="{Binding Path=WinningPercentageStr}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="积分" Width="*" Binding="{Binding Path=Integral}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="连胜数" Width="*" Binding="{Binding Path=StreakNumber}"  CellStyle="{StaticResource  DataGirdView_UI}"></DataGridTextColumn>
                <DataGridTextColumn Header="" Width="*" Binding="{Binding Path=StreakName}"  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= TeamRanksModel,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="Id"  Header="排名序号" Width="112"  />
                <dxg:GridColumn FieldName="TeamCNAlias"  Header="球队名" Width="112"    />
                <dxg:GridColumn FieldName="Wins" Header="胜" Width="180" />
                <dxg:GridColumn FieldName="Losses" Header="负" Width="180"   />
                <dxg:GridColumn FieldName="WinningPercentageStr" Header="胜率" Width="180" />
                <dxg:GridColumn FieldName="Integral" Header="积分" Width="180"  />
                <dxg:GridColumn FieldName="StreakNumber"  Header="连胜数" Width="180"  />
                <dxg:GridColumn FieldName="StreakName"  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>
