Guest User

Untitled

a guest
May 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. public partial class Window1 : Window
  2. {
  3. public Window1()
  4. {
  5. InitializeComponent();
  6. }
  7.  
  8. private void Button_Click(object sender, RoutedEventArgs e)
  9. {
  10.  
  11.  
  12. DoubleAnimation sld_1anim = new DoubleAnimation(100, TimeSpan.FromMilliseconds(1000));
  13. sld_1.BeginAnimation(Slider.ValueProperty, sld_1anim);
  14. DoubleAnimation sld_2anim = new DoubleAnimation(50, TimeSpan.FromMilliseconds(1000));
  15. sld_2.BeginAnimation(Slider.ValueProperty, sld_2anim);
  16. DoubleAnimation sld_3anim = new DoubleAnimation(20, TimeSpan.FromMilliseconds(1000));
  17. sld_3.BeginAnimation(Slider.ValueProperty, sld_3anim);
  18. }
  19.  
  20. private void Button_Click_1(object sender, RoutedEventArgs e)
  21. {
  22. sld_1.Value = 1;
  23. sld_2.Value = 1;
  24. sld_3.Value = 1;
  25.  
  26. MessageBox.Show(sld_1.Value.ToString());
  27. MessageBox.Show(sld_2.Value.ToString());
  28. MessageBox.Show(sld_3.Value.ToString());
  29.  
  30. }
  31. }
Add Comment
Please, Sign In to add comment