<Window x:Class="SPC.Kiosk.Start.StartWindow"
        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:vm="clr-namespace:SPC.Kiosk.Start.ViewModel;assembly=SPC.Kiosk.Start.ViewModel"
        xmlns:uc ="clr-namespace:SPC.Kiosk.Common;assembly=SPC.Kiosk.Common"
        xmlns:gif="http://wpfanimatedgif.codeplex.com"
        mc:Ignorable="d" AllowsTransparency="True"
        Title="KioskMainStart"  ShowInTaskbar="true" Topmost="True" WindowStartupLocation="Manual" WindowStyle="None" WindowState="Normal"  Background="Transparent"  
        Top="0" Left="0" Width="768" Height="1366" Margin="0,0,0,0" HorizontalAlignment="Right" ResizeMode="NoResize" Name="StartWin" Loaded="StartWindow_Loaded" AllowDrop="True">
    <!--<Window.DataContext>
        <vm:VmStartViewModel/>
    </Window.DataContext>-->
    <Grid x:Name="TopGrid" VerticalAlignment="Top" >
        <!--<StackPanel x:Name="BaseStack" Orientation="Horizontal" >-->
        <Grid x:Name="BaseGrid" Width="768"  Height="1366" VerticalAlignment="Top" Background="Black"  >
            <Grid.RowDefinitions>
            <RowDefinition Height="512"/>
            <RowDefinition Height="512"/>
            <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <uc:AnimationButton x:Name="intro" Grid.Row="0"
                                Width="768" 
                                Height="512"
                                BrushStretch="Fill"
                                NormalBrush="{Binding IntroTop}"
                                Command="{Binding BaseToTradeCommad}"
                                ClickAnimationType="None"
                                MouseClicked="BaseToTrade_MouseClicked"/>
            <uc:MediaRoll x:Name="MediaRollPlayer1" Grid.Row="1"
                            Width="768" 
                            Height="512"
                            ListMedia="{Binding MediaRollItems}"
                            Command="{Binding RollMediaCommand}"
                            MouseClicked="BaseToTrade_MouseClicked"/>
            <uc:NumericPad x:Name="TextPad" Grid.Row="2" 
                           VerticalAlignment="top"
                           Width="240"
                           Height="300"
                           NormalBrush="White"
                           DownBrush="Gray"
                           CancelNormalBrush="DarkRed"
                           CancelDownBrush="DarkGray"
                           OkNormalBrush="LightBlue"
                           OkDownBrush="DarkGray"
                           OkDisableBrush="Gray"
                           TextForeground="Black"
                           CancelLanguageText="{Binding CancelText}"
                           OkLanguageText="{Binding OkText}"
                           GuidText ="{Binding InputMobileNumberMessage}"
                           EtcText="010"
                           ClickAnimationType="TextSizeDown"
                           TextVisibility="Visible"
                           Margin="0,-50,0,0"
                           InputText="{Binding InputNumbers,Mode=TwoWay}"
                           DisplayLanguage="{Binding ShowLanguageType}"
                           OkCommand="{Binding NumericPadOkCommand}"
                           OkEnabled="False"
                           />
            <!--<uc:NumericCombo x:Name="TestCombo" Grid.Row="2" 
                             VerticalAlignment="top"
                             Height="40"
                             MinValue="1"
                             MaxValue="20"
                             ValueStep="1"
                             SelectedValue="1"
                             IsDropDown="True"
                             DropDownCount="5"/>-->
            <!--<Image gif:ImageBehavior.AnimatedSource="C:\SPC\POS\CDP\CUSTOMER\Xmas2.gif"
                   gif:ImageBehavior.RepeatBehavior="Forever"
                   Width="768"
                   Height="342"
                   VerticalAlignment="Bottom"/>-->

        </Grid>
        <Grid Name="TradeGrid" Width="768" Height="1366" VerticalAlignment="Top" Background="Black">
            <Grid.RowDefinitions>
                    <RowDefinition Height="130"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="342"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center"  VerticalAlignment="Top">
                <Image Source="C:\SPC\POS\IMAGE\icon\DD.png"
                        VerticalAlignment="Center"
                        Width="100" 
                        Height="100"
                        Margin="-100,10,0,0"/>
                <uc:MutiLanguageTextBlock x:Name="TradeHeader"
                            DisplayLanguage="{Binding ShowLanguageType}"
                            MultiLanguage="{Binding TradeHeaderText}" 
                            FontSize="48"
                            FontWeight="Black"
                            VerticalAlignment="Center"
                            Foreground="DarkGray"
                            Margin="20,0,0,0"/>
            </StackPanel>
            <StackPanel Grid.Row="1" x:Name="TradePanel" Width="768" >
                <Grid x:Name="ItemGrid" VerticalAlignment="Top">
                    <Grid.Background>
                        <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlDarkDarkColorKey}}"/>
                    </Grid.Background>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="134"/>
                        <RowDefinition Height="130"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50*"/>
                        <ColumnDefinition Width="50*"/>
                    </Grid.ColumnDefinitions>
                    <uc:ButtonList Grid.Row="0" Grid.ColumnSpan="2" x:Name="ItemList"  
                                   Width="768"
                                   Height="700"
                                   StackOrientation="Vertical"
                                   TextPosition="Right"
                                   ColumnCount ="3"
                                   RowCount="5"
                                   ItemWidth="240"
                                   ItemHeight="140"
                                   ClickSend="True"
                                   BaseGrid="{Binding Path=Name ,ElementName=TradeGrid,Mode=TwoWay}"
                                   DisplayLanguage="{Binding ShowLanguageType}"
                                   ListItems="{Binding TestItems}"
                                   DefaultPageNo="{Binding TestItemPageNo,Mode=TwoWay}"
                                   ReciveElement="{Binding Path=Name ,ElementName=SelectedItem,Mode=TwoWay}"
                                   MouseClicked="ItemList_MouseClicked"/>
                    <uc:ButtonList Grid.Row="1" Grid.ColumnSpan="2" x:Name="SelectedItem" 
                                   Width="768"
                                   Height="134"
                                   Margin="0,0,0,0"
                                   StackOrientation="Horizontal"
                                   ColumnCount ="{Binding SelectedColumnCount}"
                                   RowCount="{Binding SelectedRowCount}"
                                   ItemWidth="120"
                                   ItemHeight="120"
                                   DisplayLanguage="{Binding ShowLanguageType}"
                                   ListItems="{Binding SelectedItems}"
                                   DefaultPageNo="{Binding DefaultSelectedPageNo,Mode=TwoWay}"
                                   DefaultIndex="{Binding DefaultSelectedItem,Mode=TwoWay}"
                                   DropCommand="{Binding ListItemDropCommand}"
                                   CircleCommand="{Binding ListCircleClickCommand}"/>
                    <uc:AnimationButton Grid.Row="2" Grid.Column="0" x:Name="TradeToBaseButton"        
                                        HorizontalAlignment="Left" 
                                        VerticalAlignment="Top" 
                                        Margin="0,0,0,0" 
                                        NormalBrush="C:\SPC\POS\IMAGE\menu_btn_bule_basic.png" 
                                        DownBrush="C:\SPC\POS\IMAGE\menu_btn_bule_press.png" 
                                        TextVisible="Visible" 
                                        DisplayLanguage="{Binding ShowLanguageType}"
                                        LanguageText = "{Binding PreviousText}"
                                        TextFontSize="20"
                                        TextFontWeight="Black"
                                        TextVerticalAlignment="Center"
                                        TextHorizontalAlignment="Left"
                                        TextAlignment="Left"
                                        TextForeground="Black"
                                        TextMargin="30,0,0,0"
                                        ClickAnimationType="TextTwist"
                                        MouseClicked="TradeToBase_MouseClicked"/>
                    <uc:AnimationButton Grid.Row="2" Grid.Column="1" x:Name="TradeToBasketButton" 
                                        HorizontalAlignment="Right" 
                                        VerticalAlignment="Top" 
                                        Margin="0,0,0,0"
                                        DataParameter="TradeToBasketButtonData"
                                        NormalBrush="C:\SPC\POS\IMAGE\menu_btn_green_basic.png" 
                                        DownBrush="C:\SPC\POS\IMAGE\menu_btn_green_press.png" 
                                        ClickAnimationType="TextSizeDown"
                                        CircleSize="30"
                                        CircleText="i"
                                        CircleBackBrush="Navy"
                                        CircleTextBruch="Yellow"
                                        CircleOuter="False"
                                        CircleCommand="{Binding WaitPopupCommand}"
                                        DropCommand="{Binding ItemDropedCommand}"
                                        DropAnimationType="TextBounceDown"
                                        TextVisible="Visible" 
                                        DisplayLanguage="{Binding ShowLanguageType}"
                                        LanguageText="{Binding NextText}"
                                        TextFontSize="20"
                                        TextFontWeight="Black"
                                        TextVerticalAlignment="Center"
                                        TextHorizontalAlignment="Right"
                                        TextForeground="Black"
                                        TextWrapping="Wrap"
                                        TextAlignment="Right"
                                        TextMargin="0,0,60,0"
                                        MouseClicked="TradeToBasket_MouseClicked"/>
                </Grid>
            </StackPanel>
            <!--<Image Grid.Row="3"
                   gif:ImageBehavior.AnimatedSource="C:\SPC\POS\CDP\CUSTOMER\Xmas2.gif"
                   gif:ImageBehavior.RepeatBehavior="Forever"
                   Width="768"
                   Height="342"
                   VerticalAlignment="Bottom"/>-->
        </Grid>
        <Grid Name="BasketGrid" Width="768" Height="1366" VerticalAlignment="Top" Background="Black">
            <Grid Width="768" Height="1024" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="{Binding Path=Height,ElementName=ToggleButton}"/>
                    <RowDefinition Height="{Binding Path=Height,ElementName=BasketToTradeButton}"/>
                </Grid.RowDefinitions>
                <uc:MediaPlayer x:Name="TitleMedia3" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
                                    VerticalAlignment="Top"
                                    Width="768"
                                    Height="Auto"
                                    MediaFile="C:\SPC\POS\CDP\CUSTOMER\PLAYER_resize_h264.mp4"
                                    RepeatMedia="True"
                                    MouseClicked="TitleMedia3_MouseClicked"
                                    Margin="0,0,0,40"
                                    />
                <uc:AnimationButton x:Name="ToggleButton" Grid.Column="0" Grid.Row="1"
                                    Margin="0,0,0,20"    
                                    NormalBrush="C:\SPC\POS\IMAGE\menu_btn_green_basic.png" 
                                    DownBrush="C:\SPC\POS\IMAGE\menu_btn_green_press.png" 
                                    SwitchOnBrush="C:\SPC\POS\IMAGE\menu_btn_green_press.png"
                                    Switch="{Binding ToggleSwitch,Mode=TwoWay}"
                                    DragEnable="True"
                                    DragCursorImage="C:\SPC\POS\IMAGE\icon\DD.ico"
                                    DragCursorHotSpot="Center"
                                    AutoToggle="True"
                                    TextVisible="Visible" 
                                    DisplayLanguage="{Binding ShowLanguageType}"
                                    LanguageText="{Binding ToggleText}"
                                    TextFontSize="20"
                                    TextFontWeight="Black"
                                    TextVerticalAlignment="Center"
                                    TextHorizontalAlignment="Center"
                                    TextAlignment="Center"
                                    TextForeground="Black"
                                    TextMargin="0,0,30,0"
                                    ClickAnimationType="TextSizeDown"
                                    MouseClicked="ToggleButton_MouseClicked" RenderTransformOrigin="0.5,0.5"/>
                <uc:AnimationButton x:Name="OpenMsgBox" Grid.Column="1" Grid.Row="1"
                                    Margin="0,0,0,20"    
                                    NormalBrush="C:\SPC\POS\IMAGE\menu_btn_bule_basic.png" 
                                    DownBrush="C:\SPC\POS\IMAGE\menu_btn_bule_press.png" 
                                    TextVisible="Visible" 
                                    DisplayLanguage="{Binding ShowLanguageType}"
                                    LanguageText="{Binding PopupText}"
                                    TextFontSize="20"
                                    TextFontWeight="Black"
                                    TextVerticalAlignment="Center"
                                    TextHorizontalAlignment="Left"
                                    TextAlignment="Left"
                                    TextForeground="Black"
                                    TextMargin="30,0,0,0"
                                    ClickAnimationType="TextTwist"
                                    Command="{Binding OpenPopupCommand}"/>

                <uc:AnimationButton x:Name="BasketToTradeButton" Grid.Column="0" Grid.Row="2"
                                    NormalBrush="C:\SPC\POS\IMAGE\menu_btn_bule_basic.png" 
                                    DownBrush="C:\SPC\POS\IMAGE\menu_btn_bule_press.png" 
                                    TextVisible="Visible" 
                                    DisplayLanguage="{Binding ShowLanguageType}"
                                    LanguageText="{Binding PreviousText}"
                                    TextFontSize="20"
                                    TextFontWeight="Black"
                                    TextVerticalAlignment="Center"
                                    TextHorizontalAlignment="Left"
                                    TextAlignment="Left"
                                    TextForeground="Black"
                                    TextMargin="30,0,0,0"
                                    ClickAnimationType="TextTwist"
                                    MouseClicked="BasketToTrade_MouseClicked"/>

                <uc:AnimationButton x:Name="Test" Grid.Column="1" Grid.Row="2" 
                                    NormalBrush="C:\SPC\POS\IMAGE\menu_btn_bule_basic.png" 
                                    DownBrush="C:\SPC\POS\IMAGE\menu_btn_bule_press.png" 
                                    TextVisible="Visible" 
                                    DisplayLanguage="{Binding ShowLanguageType}"
                                    LanguageText="{Binding ExistText}"
                                    TextFontSize="20"
                                    TextFontWeight="Black"
                                    TextVerticalAlignment="Center"
                                    TextHorizontalAlignment="Center"
                                    TextAlignment="Center"
                                    TextForeground="DarkRed"
                                    ClickAnimationType="TextTwist"
                                    MouseClicked="CloseImage_Click"
                                    DropAnimationType="TextBounceUp"
                                    DropCommand="{Binding BaseToTradeCommad}"/>
            </Grid>
            <!--<Image gif:ImageBehavior.AnimatedSource="C:\SPC\POS\CDP\CUSTOMER\Xmas2.gif"
                   gif:ImageBehavior.RepeatBehavior="Forever"
                   Width="768"
                   Height="342"
                   VerticalAlignment="Bottom"/>-->
            <uc:NumericPad x:Name="TextPad2" Grid.Row="2" 
                           Width="150"
                           Height="200"
                           NormalBrush="White"
                           DownBrush="DarkGray"
                           CancelNormalBrush="DarkRed"
                           CancelDownBrush="DarkGray"
                           OkNormalBrush="LightBlue"
                           OkDownBrush="DarkGray"
                           OkDisableBrush="Gray"
                           CancelLanguageText="{Binding CancelText}"
                           OkLanguageText="{Binding OkText}"
                           GuidText ="{Binding InputMobileNumberMessage}"
                           ClickAnimationType="TextSizeDown"
                           DisplayLanguage="{Binding ShowLanguageType}"
                           VerticalAlignment="Bottom"
                           />

        </Grid>

        <!--</StackPanel>-->
    </Grid>

</Window>
