Guest User

Untitled

a guest
Jun 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. <Grid>
  2. <Label Width="100" Height="50" Background="Tomato" BorderThickness="3" BorderBrush="ForestGreen">
  3. <Label.Style>
  4. <Style TargetType="Label">
  5. <Setter Property="Template">
  6. <Setter.Value>
  7. <ControlTemplate>
  8. <Border CornerRadius="30" BorderBrush="Transparent" BorderThickness="0" Background="Tomato"></Border>
  9. </ControlTemplate>
  10. </Setter.Value>
  11. </Setter>
  12. </Style>
  13. </Label.Style>
  14. <Label.RenderTransform>
  15. <TranslateTransform x:Name="LabelTransform" />
  16. </Label.RenderTransform>
  17. <Label.Triggers>
  18. <EventTrigger RoutedEvent="MouseLeftButtonDown">
  19. <EventTrigger.Actions>
  20. <BeginStoryboard>
  21. <Storyboard>
  22. <DoubleAnimationUsingKeyFrames Duration="0:0:1" Storyboard.TargetProperty="Width">
  23. <LinearDoubleKeyFrame KeyTime="0%" Value="100" />
  24. <LinearDoubleKeyFrame KeyTime="10%" Value="110" />
  25. <LinearDoubleKeyFrame KeyTime="20%" Value="120" />
  26. <LinearDoubleKeyFrame KeyTime="30%" Value="130" />
  27. <LinearDoubleKeyFrame KeyTime="40%" Value="140" />
  28. <LinearDoubleKeyFrame KeyTime="50%" Value="150" />
  29. <LinearDoubleKeyFrame KeyTime="60%" Value="140" />
  30. <LinearDoubleKeyFrame KeyTime="70%" Value="130" />
  31. <LinearDoubleKeyFrame KeyTime="80%" Value="120" />
  32. <LinearDoubleKeyFrame KeyTime="90%" Value="110" />
  33. <LinearDoubleKeyFrame KeyTime="100%" Value="100" />
  34. </DoubleAnimationUsingKeyFrames>
  35. <DoubleAnimation Duration="0:0:1" To="100"
  36. Storyboard.TargetName="LabelTransform"
  37. Storyboard.TargetProperty="X">
  38.  
  39. </DoubleAnimation>
  40. </Storyboard>
  41.  
  42. </BeginStoryboard>
  43.  
  44. </EventTrigger.Actions>
  45. </EventTrigger>
  46. </Label.Triggers>
  47. </Label>
  48. </Grid>
Add Comment
Please, Sign In to add comment