Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:local="clr-namespace:Controls"
  4. xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing">
  5. <Style TargetType="local:UniformButton">
  6. <Setter Property="Template">
  7. <Setter.Value>
  8. <ControlTemplate TargetType="local:UniformButton">
  9. <ed:RegularPolygon x:Name="regularPolygon" Fill="White" Height="100" InnerRadius="0.55" PointCount="5" Stretch="Fill" Stroke="Black"
  10. Width="100" StrokeThickness="0.5">
  11. <VisualStateManager.VisualStateGroups>
  12. <VisualStateGroup x:Name="CommonStates">
  13. <VisualState x:Name="Normal"/>
  14. <VisualState x:Name="Hovered">
  15. <Storyboard>
  16. <!-- СМОТРЕТЬ СЮДА -->
  17. <ColorAnimation Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="regularPolygon"
  18. To="{Binding HoverBackground}">
  19. </ColorAnimation>
  20. </Storyboard>
  21. </VisualState>
  22. </VisualStateGroup>
  23. </VisualStateManager.VisualStateGroups>
  24. </ed:RegularPolygon>
  25. </ControlTemplate>
  26. </Setter.Value>
  27. </Setter>
  28. </Style>
  29. </ResourceDictionary>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement