App.xaml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <Application x:Class="GCHR.App"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" DispatcherUnhandledException="ApplicationDispatcherUnhandledException">
  4. <Application.Resources>
  5. <ControlTemplate x:Key="GlassButton" TargetType="{x:Type Button}">
  6. <ControlTemplate.Resources>
  7. <Storyboard x:Key="Timeline1">
  8. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
  9. <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
  10. </DoubleAnimationUsingKeyFrames>
  11. </Storyboard>
  12. <Storyboard x:Key="Timeline2">
  13. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
  14. <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
  15. </DoubleAnimationUsingKeyFrames>
  16. </Storyboard>
  17. </ControlTemplate.Resources>
  18. <Border BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
  19. <Border x:Name="border" Background="#9EBFDE" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="0.507*"/>
  23. <RowDefinition Height="0.493*"/>
  24. </Grid.RowDefinitions>
  25. <Border Grid.RowSpan="2" HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="shine" Width="Auto" CornerRadius="4,4,0,0">
  26. <Border.Background>
  27. <LinearGradientBrush EndPoint="0.494,0.889" StartPoint="0.494,0.028">
  28. <!--<GradientStop Color="#99FFFFFF" Offset="0"/>
  29. <GradientStop Color="#33FFFFFF" Offset="1"/>-->
  30. <GradientStop Color="#FF9EBFDE" Offset="0"/>
  31. <GradientStop Color="#FF30567A" Offset="1"/>
  32. </LinearGradientBrush>
  33. </Border.Background>
  34. </Border>
  35. <Border Opacity="0" HorizontalAlignment="Stretch" x:Name="glow" Width="Auto" Grid.RowSpan="2" CornerRadius="4,4,4,4">
  36. <Border.Background>
  37. <RadialGradientBrush>
  38. <RadialGradientBrush.RelativeTransform>
  39. <TransformGroup>
  40. <ScaleTransform ScaleX="1.702" ScaleY="2.243"/>
  41. <SkewTransform AngleX="0" AngleY="0"/>
  42. <RotateTransform Angle="0"/>
  43. <TranslateTransform X="-0.368" Y="-0.152"/>
  44. </TransformGroup>
  45. </RadialGradientBrush.RelativeTransform>
  46. <GradientStop Color="#B29EBFDE" Offset="0"/>
  47. <GradientStop Color="#009EBFDE" Offset="1"/>
  48. <!--<GradientStop Color="White" Offset="0"/>
  49. <GradientStop Color="LightBlue" Offset="1"/>-->
  50. </RadialGradientBrush>
  51. </Border.Background>
  52. </Border>
  53. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Grid.RowSpan="2"/>
  54. </Grid>
  55. </Border>
  56. </Border>
  57. <ControlTemplate.Triggers>
  58. <Trigger Property="IsEnabled" Value="False">
  59. <Setter Property="Opacity" TargetName="shine" Value="0.0"/>
  60. <Setter Property="Background" TargetName="border" Value="#FFCCCCCC"/>
  61. <Setter Property="Visibility" TargetName="glow" Value="Hidden"/>
  62. </Trigger>
  63. <Trigger Property="IsPressed" Value="True">
  64. <Setter Property="Opacity" TargetName="shine" Value="0.4"/>
  65. <Setter Property="Background" TargetName="border" Value="#100000FF"/>
  66. <Setter Property="Visibility" TargetName="glow" Value="Hidden"/>
  67. </Trigger>
  68. <Trigger Property="IsMouseOver" Value="True">
  69. <Trigger.EnterActions>
  70. <BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
  71. </Trigger.EnterActions>
  72. <Trigger.ExitActions>
  73. <BeginStoryboard x:Name="Timeline2_BeginStoryboard" Storyboard="{StaticResource Timeline2}"/>
  74. </Trigger.ExitActions>
  75. </Trigger>
  76. </ControlTemplate.Triggers>
  77. </ControlTemplate>
  78. <ControlTemplate x:Key="GlassProgressBar" TargetType="{x:Type ProgressBar}">
  79. <Border BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
  80. <Border x:Name="border" Background="#9EBFDE" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
  81. <Grid>
  82. <Grid.RowDefinitions>
  83. <RowDefinition Height="0.507*"/>
  84. <RowDefinition Height="0.493*"/>
  85. </Grid.RowDefinitions>
  86. <Decorator Grid.RowSpan="2" Name="PART_Track">
  87. <Border Name="PART_Indicator" HorizontalAlignment="Left"
  88. Width="Auto" Grid.RowSpan="2" CornerRadius="4,4,4,4"
  89. Background="Black" />
  90. </Decorator>
  91. <Border Opacity="0" HorizontalAlignment="Stretch" x:Name="glow" Width="Auto" Grid.RowSpan="2" CornerRadius="4,4,4,4">
  92. <Border.Background>
  93. <RadialGradientBrush>
  94. <RadialGradientBrush.RelativeTransform>
  95. <TransformGroup>
  96. <ScaleTransform ScaleX="1.702" ScaleY="2.243"/>
  97. <SkewTransform AngleX="0" AngleY="0"/>
  98. <RotateTransform Angle="0"/>
  99. <TranslateTransform X="-0.368" Y="-0.152"/>
  100. </TransformGroup>
  101. </RadialGradientBrush.RelativeTransform>
  102. <GradientStop Color="#B29EBFDE" Offset="0"/>
  103. <GradientStop Color="#009EBFDE" Offset="1"/>
  104. </RadialGradientBrush>
  105. </Border.Background>
  106. </Border>
  107. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Grid.RowSpan="2"/>
  108. <Border HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="shine" Width="Auto" CornerRadius="4,4,0,0">
  109. <Border.Background>
  110. <LinearGradientBrush EndPoint="0.494,0.889" StartPoint="0.494,0.028">
  111. <GradientStop Color="#99FFFFFF" Offset="0" />
  112. <GradientStop Color="#338DBDFF" Offset="1" />
  113. </LinearGradientBrush>
  114. </Border.Background>
  115. </Border>
  116. </Grid>
  117. </Border>
  118. </Border>
  119. <ControlTemplate.Triggers>
  120. </ControlTemplate.Triggers>
  121. </ControlTemplate>
  122. </Application.Resources>
  123. </Application>