FlipClock.xaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:hc="clr-namespace:HandyControl.Controls">
  3. <Style TargetType="hc:FlipNumber">
  4. <Setter Property="FontSize" Value="70"/>
  5. <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
  6. <Setter Property="Background" Value="{DynamicResource TitleBrush}"/>
  7. <Setter Property="Width" Value="120"/>
  8. <Setter Property="Height" Value="180"/>
  9. <Setter Property="Camera">
  10. <Setter.Value>
  11. <PerspectiveCamera Position="0 0 120" LookDirection="0 0 -1" />
  12. </Setter.Value>
  13. </Setter>
  14. </Style>
  15. <Style TargetType="hc:FlipClock">
  16. <Setter Property="Focusable" Value="False"/>
  17. <Setter Property="Template">
  18. <Setter.Value>
  19. <ControlTemplate TargetType="hc:FlipClock">
  20. <StackPanel Orientation="Horizontal">
  21. <hc:FlipNumber Margin="-20" Number="{Binding NumberList[0],RelativeSource={RelativeSource TemplatedParent}}"/>
  22. <hc:FlipNumber Margin="-20" Number="{Binding NumberList[1],RelativeSource={RelativeSource TemplatedParent}}"/>
  23. <hc:FlipNumber Margin="0,-20,-20,-20" Number="{Binding NumberList[2],RelativeSource={RelativeSource TemplatedParent}}"/>
  24. <hc:FlipNumber Margin="-20" Number="{Binding NumberList[3],RelativeSource={RelativeSource TemplatedParent}}"/>
  25. <hc:FlipNumber Margin="0,-20,-20,-20" Number="{Binding NumberList[4],RelativeSource={RelativeSource TemplatedParent}}"/>
  26. <hc:FlipNumber Margin="-20" Number="{Binding NumberList[5],RelativeSource={RelativeSource TemplatedParent}}"/>
  27. </StackPanel>
  28. </ControlTemplate>
  29. </Setter.Value>
  30. </Setter>
  31. </Style>
  32. </ResourceDictionary>