<UserControl x:Class="VIZ.TVP.WMCUP.Module.DateHeaderView"
             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:sys="clr-namespace:System;assembly=mscorlib"
                      xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
                      xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
                      xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
                      x:Name="uc"
             
                      xmlns:storage="clr-namespace:VIZ.TVP.WMCUP.Module"
             mc:Ignorable="d"
             d:DesignHeight="800" d:DesignWidth="800" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <WrapPanel  Grid.Row="0" VerticalAlignment="Center">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="90"/>
                    <ColumnDefinition Width="90"/>
                    <ColumnDefinition Width="150"/>
                    <ColumnDefinition Width="280"/>
                </Grid.ColumnDefinitions>


                <TextBlock Text="比赛日期:" Grid.Column="0" FontSize="14"  HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <dxe:DateEdit Grid.Column="1" HorizontalAlignment="Center" Name="Date_MatchDateInfo" Width="120" 
                              EditValue="{Binding MatchDate,Mode=TwoWay}" FontSize="16"     ShowToday="False" ShowClearButton="False"  
                                  VerticalAlignment="Center"  MaskUseAsDisplayFormat="True" >
                </dxe:DateEdit>
                <Button Grid.Column="2" Content="前一天"  FontSize="14" Width="70"  Height="30" Command="{Binding UpDateCmd}" />
                <Button Grid.Column="3" Content="后一天"  FontSize="14" Width="70"  Height="30" Command="{Binding DownDateCmd}" />

                <WrapPanel Grid.Column="4" VerticalAlignment="Center">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="80"/>
                            <ColumnDefinition Width="35"/>
                            <ColumnDefinition Width="35"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="数据源：" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="14" />
                        <RadioButton Content="主" FontSize="14" Grid.Column="1" IsChecked="{Binding MainDataConnection,Mode=TwoWay}"/>
                        <RadioButton Content="备" FontSize="14" Grid.Column="2" IsChecked="{Binding BackDataConnection,Mode=TwoWay}"/>
                    </Grid>
                </WrapPanel>


            </Grid>
        </WrapPanel>

        <TabControl Grid.Row="1">
            <TabItem Header="比赛赛程" >
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <WrapPanel  Grid.Row="0" Width="750" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-2,0,0,0" >
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="60"/>
                                <ColumnDefinition Width="130"/>
                                <ColumnDefinition Width="140"/>

                            </Grid.ColumnDefinitions>

                            <!--<TextBlock  TextBlock.TextAlignment="Center" Text="轮次：" Width="60" Grid.Column="4"  FontSize="16"  VerticalAlignment="Center"/>

                            <dxe:ComboBoxEdit Grid.Column="5"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"
                          Width="120" ItemsSource="{Binding Path=RoundMatchs,Mode=TwoWay}" 
                          SelectedItem="{Binding Path=RoundMatchItem,Mode=TwoWay}"  >
                            </dxe:ComboBoxEdit>-->

                            <WrapPanel Grid.Row="0" Grid.Column="6" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="110"/>
                                        <ColumnDefinition Width="30"/>
                                    </Grid.ColumnDefinitions>

                                    <Button Grid.Row="0" Grid.Column="0" Content="刷新"   FontSize="16" 
                                          Command="{Binding BtnRoundCmd}" HorizontalContentAlignment="Center"
                                          Width="100" Height="30" />


                                    <!--<dx:SimpleButton  Grid.Row="1" Grid.Column="1"  Glyph='/VIZ.TVP.FTB.Module;component/Image/FT/Prompt2525.png' FontSize="16" 
                                          Command="{Binding PromptCommand}" HorizontalContentAlignment="Center"  Width="30" Height="30"  />-->
                                </Grid>
                            </WrapPanel>

                        </Grid>
                    </WrapPanel>

                    <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= MatchData,Mode=TwoWay}" SelectedItem="{Binding Path=SelectMatchData,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="date"  Header="日期" Width="112"  />
                            <dxg:GridColumn FieldName="time"  Header="时间" Width="112"    />
                            <!--<dxg:GridColumn FieldName="homeTeamLogo" Header="主队队徽" Width="180" />-->
                            <dxg:GridColumn FieldName="homeNationName" Header="主队" Width="180" />
                            <dxg:GridColumn FieldName="homeTeamScore" Header="主队得分" Width="180"   />
                            <dxg:GridColumn FieldName="visitingTeamScore" Header="客队得分" Width="180"  />
                            <dxg:GridColumn FieldName="visitingNationName" Header="客队" Width="180" />

                            <!--<dxg:GridColumn FieldName="visitingTeamLogo" Header="客队队徽" Width="180" />-->

                            <!--<dxg:GridColumn FieldName="status" Header="比赛状态" Width="180" />-->

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


                                <dxg:TableView IsColumnMenuEnabled="True"
                                                       IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible,Mode=TwoWay}"
                                                       AllowEditing="False" ShowIndicator="False"  AutoWidth="True"
                                                       NavigationStyle="Cell" ShowVerticalLines="False" ShowHorizontalLines="False"
                                                       ShowGroupPanel="False" EditorShowMode="MouseDown"
                                                       AllowDragDrop="True"
                                                       AlternateRowBackground="#05ffffff"
                                                       ShowBandsPanel="False"
                                                       ShowTotalSummary="False"
                                                       ShowFixedTotalSummary="False" 
                                                       ShowDragDropHint="False" 
                                                       AllowSorting="False" 
                                                       AllowColumnFiltering="False"
                                                       ShowTargetInfoInDragDropHint="false">

                                    <dxmvvm:Interaction.Behaviors>
                                        <dxmvvm:EventToCommand EventName="ShowGridMenu" Command="{Binding ElementName=uc, Path=DataContext.ShowGridMenuCommand}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
                                    </dxmvvm:Interaction.Behaviors>

                                    <dxg:TableView.ColumnMenuCustomizations>
                                        <dxb:BarButtonItem Name="ShowColumnChooser" Content="显示列选择" 
                                               Command="{Binding ElementName=uc,Path=DataContext.ColumnChoiceCommand}"
                                               Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
                                    </dxg:TableView.ColumnMenuCustomizations>

                                </dxg:TableView>

                            </dxg:GridControl.View>
                        </dxg:GridControl>
                    </DockPanel>

                </Grid>
            </TabItem>

            <!--<TabItem Header="积分排行">

                <Grid >

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

                    <WrapPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" Width="750" >
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="140"/>
                                --><!--<ColumnDefinition Width="120"/>--><!--
                            </Grid.ColumnDefinitions>

                            <WrapPanel Grid.Row="0" Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center">

                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="100"/>
                                        <ColumnDefinition Width="30"/>
                                    </Grid.ColumnDefinitions>

                                    <Button Grid.Column="0" Content="加载数据"  FontSize="14" Width="90"  Height="30" Command="{Binding BtnCmd1}" />

                                    --><!--<dx:SimpleButton  Grid.Row="0" Grid.Column="1"  Glyph='/VIZ.TVP.FTB.Module;component/Image/FT/Prompt2525.png' FontSize="16" 
                                          Command="{Binding PromptCommand1}" HorizontalContentAlignment="Center"  Width="30" Height="30"  />--><!--
                                </Grid>
                            </WrapPanel>


                        </Grid>
                    </WrapPanel>


                    <DockPanel  Grid.Row="1">

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

                        </ScrollViewer>

                        <dxg:GridControl x:Name="grid_teamRank" ShowBorder="False" ItemsSource="{Binding Path= TeamRanksModel,Mode=TwoWay}">

                            <dxg:GridColumn FieldName="rank"  Header="排名" Width="112"  />
                            --><!--<dxg:GridColumn FieldName="teamLogo" Header="球队队徽" Width="112"/>--><!--
                            <dxg:GridColumn FieldName="teamName"  Header="球队名" Width="112"    />
                            <dxg:GridColumn FieldName="matchNum"  Header="场次" Width="180"  />
                            <dxg:GridColumn FieldName="winNum" Header="胜" Width="100" />
                            <dxg:GridColumn FieldName="drawNum" Header="平" Width="100"/>
                            <dxg:GridColumn FieldName="loseNum" Header="负" Width="100"   />
                            <dxg:GridColumn FieldName="goalAndLoseNums"  Header="进/失" Width="180"  />
                            <dxg:GridColumn FieldName="score" Header="积分" Width="180"  />

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

                                <dxg:TableView IsColumnMenuEnabled="True"
                                                       IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible1,Mode=TwoWay}"
                                                       AllowEditing="False" ShowIndicator="False"  AutoWidth="True"
                                                       NavigationStyle="Cell" ShowVerticalLines="False" ShowHorizontalLines="False"
                                                       ShowGroupPanel="False" EditorShowMode="MouseDown"
                                                       AllowDragDrop="True"
                                                       AlternateRowBackground="#05ffffff"
                                                       ShowBandsPanel="False"
                                                       ShowTotalSummary="False"
                                                       ShowFixedTotalSummary="False" 
                                                       ShowDragDropHint="False" 
                                                       AllowSorting="False" 
                                                       AllowColumnFiltering="False"
                                                       ShowTargetInfoInDragDropHint="false">

                                    <dxmvvm:Interaction.Behaviors>
                                        <dxmvvm:EventToCommand EventName="ShowGridMenu" Command="{Binding ElementName=uc, Path=DataContext.ShowGridMenuCommand1}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
                                    </dxmvvm:Interaction.Behaviors>

                                    <dxg:TableView.ColumnMenuCustomizations>
                                        <dxb:BarButtonItem Name="ShowColumnChooser1" Content="显示列选择" 
                                               Command="{Binding ElementName=uc,Path=DataContext.ColumnChoiceCommand1}"
                                               Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
                                    </dxg:TableView.ColumnMenuCustomizations>

                                </dxg:TableView>
                            </dxg:GridControl.View>
                        </dxg:GridControl>
                    </DockPanel>


                </Grid>

            </TabItem>-->

            <!--<TabItem Header="射手排行">

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

                    <WrapPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" Width="750" >
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition Width="300"/>
                                <ColumnDefinition Width="140"/>
                                --><!--<ColumnDefinition Width="120"/>--><!--
                            </Grid.ColumnDefinitions>


                            <WrapPanel Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" >

                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="75"/>
                                        <ColumnDefinition Width="75"/>
                                        <ColumnDefinition Width="75"/>
                                        <ColumnDefinition Width="75"/>
                                    </Grid.ColumnDefinitions>

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

                                    <dxe:TextEdit Grid.Column="1" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" 
                                      Text="{Binding  StartOffset,Mode=TwoWay}" Width="60"/>

                                    <TextBlock Text="结束：" FontSize="16"  Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>


                                    <dxe:TextEdit Grid.Column="4" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" 
                                      Text="{Binding EndOffset,Mode=TwoWay}" Width="60"/>


                                </Grid>

                            </WrapPanel>

                            <WrapPanel Grid.Row="0" Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center">

                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="100"/>
                                        <ColumnDefinition Width="30"/>
                                    </Grid.ColumnDefinitions>

                                    <Button Grid.Column="0" Content="加载数据"  FontSize="14" Width="90"  Height="30" Command="{Binding BtnCmd2}" />

                                    --><!--<dx:SimpleButton  Grid.Row="0" Grid.Column="1"  Glyph='/VIZ.TVP.FTB.Module;component/Image/FT/Prompt2525.png' FontSize="16" 
                                          Command="{Binding PromptCommand}" HorizontalContentAlignment="Center"  Width="30" Height="30"  />--><!--
                                </Grid>
                            </WrapPanel>


                        </Grid>
                    </WrapPanel>


                    <DockPanel  Grid.Row="1">

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

                        </ScrollViewer>

                        <dxg:GridControl x:Name="grid_Shoot" ShowBorder="False" ItemsSource="{Binding Path= ShootPlayerModel,Mode=TwoWay}">

                            <dxg:GridColumn FieldName="rank"  Header="排名" Width="112"  />
                            --><!--<dxg:GridColumn FieldName="playerLogo" Header="球员图片" Width="112"/>--><!--
                            <dxg:GridColumn FieldName="teamLogo" Header="球队名称" Width="112"/>
                            <dxg:GridColumn FieldName="figureName"  Header="球员名称" Width="112"    />
                            <dxg:GridColumn FieldName="goals"  Header="进球数" Width="180"  />
                            <dxg:GridColumn FieldName="penaltyGoals" Header="点球" Width="100" />

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


                                <dxg:TableView IsColumnMenuEnabled="True"
                                                       IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible2,Mode=TwoWay}"
                                                       AllowEditing="False" ShowIndicator="False"  AutoWidth="True"
                                                       NavigationStyle="Cell" ShowVerticalLines="False" ShowHorizontalLines="False"
                                                       ShowGroupPanel="False" EditorShowMode="MouseDown"
                                                       AllowDragDrop="True"
                                                       AlternateRowBackground="#05ffffff"
                                                       ShowBandsPanel="False"
                                                       ShowTotalSummary="False"
                                                       ShowFixedTotalSummary="False" 
                                                       ShowDragDropHint="False" 
                                                       AllowSorting="False" 
                                                       AllowColumnFiltering="False"
                                                       ShowTargetInfoInDragDropHint="false">

                                    <dxmvvm:Interaction.Behaviors>
                                        <dxmvvm:EventToCommand EventName="ShowGridMenu" Command="{Binding ElementName=uc, Path=DataContext.ShowGridMenuCommand2}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
                                    </dxmvvm:Interaction.Behaviors>

                                    <dxg:TableView.ColumnMenuCustomizations>
                                        <dxb:BarButtonItem Name="ShowColumnChooser2" Content="显示列选择" 
                                               Command="{Binding ElementName=uc,Path=DataContext.ColumnChoiceCommand2}"
                                               Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
                                    </dxg:TableView.ColumnMenuCustomizations>

                                </dxg:TableView>

                            </dxg:GridControl.View>
                        </dxg:GridControl>
                    </DockPanel>


                </Grid>

            </TabItem>-->
            
        </TabControl>

    </Grid>
</UserControl>
