locked
How to change Background and Foreground of a TextBlock when is swapped?

    Question

  • Hi,
    In Store is an app made by Microsoft named Wordament.
    To start the app 4 letters(TextBlocks) P L A Y are used.
    If tapped First and Last letter the Background and Foreground
    change at all 4 and app starts.
    If First is tapped and swepped?? over the next 3 the Background and Foreground
    change at all 4 and app starts.

    Any idea how is done please?

    With phone 7.1 tried see code but in Store Windows 8.1 no MouseLeftButtonDown
    MouseMove

      <Canvas Height="50" HorizontalAlignment="Left" m
                        Margin="0,0,0,0" Name="gBoard"
                        VerticalAlignment="Top" Width="200" 
                    MouseLeftButtonDown="gBoard_MouseLeftButtonDown"
           
                    MouseMove="gBoard_MouseMove"
            
                    ManipulationCompleted="OnManipulationCompleted"
                    >
                <TextBlock Text="B"
                           Name="tb_00"  Width="50" Height="50"
                           FontWeight="Bold" Canvas.Left="0"
                           Canvas.Top="0"
                           Style="{StaticResource GamePiece}"
                          />
                <TextBlock Text="L" Name="tb_01"  Height="50"
                           Width="50" FontWeight="Bold"
                           Canvas.Left="50" Canvas.Top="0"
                        
                           Style="{StaticResource GamePiece}"
                           />
                <TextBlock Text="U" Name="tb_02"  Width="50"
                           Height="50" FontWeight="Bold"
                           Canvas.Left="100" Canvas.Top="0" 
                          
           
                           Style="{StaticResource GamePiece}"
                           />
                <TextBlock Text="E" Name="tb_03"  Width="50"
                           Height="50" FontWeight="Bold"
                           Canvas.Left="150" Canvas.Top="0"
                          
                           Style="{StaticResource GamePiece}"
                           />

            </Canvas>


    ADRIAN DIBU


    • Edited by adibu Friday, February 14, 2014 1:34 AM Erorr
    Friday, February 14, 2014 12:27 AM

All replies