locked
animation for control visibility RRS feed

  • Question

  • I have a grid (in windows 8 metro app) and I want when the visibility property is changed, its opacity changes gradually.

    I know I must use <VisualStateManager.VisualStateGroups>but how. please advice me.

     <Grid x:Name="CorrectResult"  Width="300" Height="350" >
          <Grid.RowDefinitions>
          <RowDefinition/>
          </Grid.RowDefinitions>
          <TextBlock Text="&#xE17E;" FontSize="80" FontFamily="Segoe UI Symbol"     VerticalAlignment="Center" HorizontalAlignment="Center"  >
          </TextBlock>
          <TextBlock  TextAlignment="Center" Text="&#xE17F;" FontSize="32" FontFamily="Segoe UI Symbol" Margin="122,78,63,79" />
          <TextBlock  TextAlignment="Center" Text="&#xE19F;" FontSize="32" FontFamily="Segoe UI Symbol" Margin="142,76,43,0" Foreground="Green" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Height="43" VerticalAlignment="Top">
    
          </TextBlock>
          <TextBlock x:Uid="AnswerIsRight" HorizontalAlignment="Left" Margin="137,146,0,0"  TextWrapping="Wrap" Text="Hooora, Right. You are awsome." VerticalAlignment="Top" Width="130" Height="91" TextAlignment="Center" FontSize="18" FontWeight="Bold"/>        
            </Grid>
    Monday, December 3, 2012 10:11 AM

Answers