Advertisement
Guest User

Untitled

a guest
May 7th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. <StackPanel Grid.Row="0" Margin="10, 40, 10, 0">
  2.  
  3.  
  4. <TextBlock Text="Email" />
  5. <TextBox PlaceholderText="abc@gmail.com" Text="abcd@gmail.com" InputScope="EmailSmtpAddress" Name="logintext" MaxLength="30"/>
  6.  
  7. <TextBlock Text="Password" />
  8. <PasswordBox Name="pass2" Password="6F6N" />
  9.  
  10. <Grid>
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition />
  13. <ColumnDefinition />
  14. </Grid.ColumnDefinitions>
  15. <Button Content="Login" />
  16. <Button Content="Register" Grid.Column="1" />
  17. </Grid>
  18. <TextBlock Text="Forgot Password?" FontSize="20" HorizontalAlignment="Center" Tapped="forgetPassword_Tapped" Foreground="Blue" Margin="0, 10, 0, 0"/>
  19. </StackPanel>
  20. </Grid>
  21.  
  22.  
  23.  
  24. <Grid Name="SecondaryGrid" Visibility="Collapsed" Background="#BB000000" RenderTransformOrigin="0.5,0.5" >
  25. <Grid.RenderTransform>
  26. <CompositeTransform/>
  27. </Grid.RenderTransform>
  28. <StackPanel Margin="5" VerticalAlignment="Center" Background="ForestGreen">
  29. <StackPanel Margin="10">
  30. <TextBlock Text="Forgot Password" />
  31. <TextBlock Text="Email" />
  32. <TextBox Name="forgotPassTxtBox" PlaceholderText="abc@gmail.com" InputScope="EmailSmtpAddress" MaxLength="30"/>
  33. <Grid>
  34. <Grid.ColumnDefinitions>
  35. <ColumnDefinition />
  36. <ColumnDefinition />
  37. </Grid.ColumnDefinitions>
  38. <Button Content="Send" Name="saveBtn" />
  39. <Button Content="Cancel" Name="cancelBtn" Click="cancelBtn_Click" Grid.Column="1"/>
  40. </Grid>
  41. </StackPanel>
  42. </StackPanel>
  43. </Grid>
  44.  
  45.  
  46.  
  47. </Grid>
  48.  
  49. private void forgetPassword_Tapped(object sender, TappedRoutedEventArgs e)
  50. {
  51. //Storyboard sb = new Storyboard();
  52.  
  53.  
  54. //sb.Begin();
  55. //SecondaryGrid.Visibility = Visibility.Visible;
  56.  
  57. Grid gd= this.FindName("SecondaryGrid") as Grid;
  58. DoubleAnimationUsingKeyFrames dm=new DoubleAnimationUsingKeyFrames();
  59. LinearDoubleKeyFrame l1=new LinearDoubleKeyFrame();
  60. LinearDoubleKeyFrame l2=new LinearDoubleKeyFrame();
  61.  
  62.  
  63.  
  64. l1.Value=-703.203;
  65. l1.KeyTime=TimeSpan.FromSeconds(0);
  66.  
  67. l2.Value=0;
  68. l2.KeyTime=TimeSpan.FromSeconds(1);
  69.  
  70. dm.KeyFrames.Add(l1);
  71. dm.KeyFrames.Add(l2);
  72.  
  73. dm.Duration=new Duration(TimeSpan.FromMilliseconds(3000));
  74.  
  75. Storyboard sb = new Storyboard();
  76. sb.Children.Add(dm);
  77.  
  78.  
  79.  
  80. Storyboard.SetTarget(dm, gd);
  81. Storyboard.SetTargetName(dm, gd.Name);
  82. Storyboard.SetTargetProperty(dm, "Opacity");
  83.  
  84. sb.Begin();
  85. SecondaryGrid.Visibility = Visibility.Visible;
  86.  
  87.  
  88.  
  89.  
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement