|
20 | 20 | <UserControl.Resources>
|
21 | 21 | <ResourceDictionary>
|
22 | 22 |
|
| 23 | + <Style x:Key="PlayButtonTemplate" |
| 24 | + TargetType="Button"> |
| 25 | + <Setter Property="Margin" Value="0" /> |
| 26 | + <Setter Property="Padding" Value="4" /> |
| 27 | + <Setter Property="BorderBrush" Value="Transparent" /> |
| 28 | + <Setter Property="Background" Value="Transparent" /> |
| 29 | + |
| 30 | + <Setter Property="Template"> |
| 31 | + <Setter.Value> |
| 32 | + <ControlTemplate TargetType="Button"> |
| 33 | + <Border x:Name="ButtonBaseElement" |
| 34 | + Padding="{TemplateBinding Padding}" |
| 35 | + AutomationProperties.AccessibilityView="Raw" |
| 36 | + Background="{TemplateBinding Background}" |
| 37 | + BackgroundSizing="{TemplateBinding BackgroundSizing}" |
| 38 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 39 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 40 | + CornerRadius="{TemplateBinding CornerRadius}"> |
| 41 | + <Viewbox Width="20" |
| 42 | + Height="20"> |
| 43 | + <Grid> |
| 44 | + <FontIcon x:Name="ButtonBackgroundIcon" |
| 45 | + FontFamily="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets" |
| 46 | + Foreground="{ThemeResource PlayButtonHoveredColor}" |
| 47 | + Glyph="" |
| 48 | + Visibility="Collapsed" /> |
| 49 | + <FontIcon x:Name="ButtonOutlineIcon" |
| 50 | + FontFamily="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets" |
| 51 | + Foreground="{ThemeResource PlayButtonNormalColor}" |
| 52 | + Glyph="" /> |
| 53 | + </Grid> |
| 54 | + <!-- TODO! FontFamily="{ThemeResource SymbolThemeFontFamily}" --> |
| 55 | + </Viewbox> |
| 56 | + |
| 57 | + <VisualStateManager.VisualStateGroups> |
| 58 | + <VisualStateGroup x:Name="CommonStates"> |
| 59 | + |
| 60 | + <VisualState x:Name="Normal"> |
| 61 | + <VisualState.Setters> |
| 62 | + <Setter Target="ButtonBackgroundIcon.Visibility" Value="Collapsed" /> |
| 63 | + </VisualState.Setters> |
| 64 | + </VisualState> |
| 65 | + |
| 66 | + <VisualState x:Name="PointerOver"> |
| 67 | + <VisualState.Setters> |
| 68 | + <Setter Target="ButtonBackgroundIcon.Visibility" Value="Visible" /> |
| 69 | + </VisualState.Setters> |
| 70 | + </VisualState> |
| 71 | + |
| 72 | + <VisualState x:Name="Disabled" /> |
| 73 | + </VisualStateGroup> |
| 74 | + |
| 75 | + <VisualStateGroup x:Name="PlayButtonStates"> |
| 76 | + <VisualState x:Name="Ready"> |
| 77 | + <VisualState.Setters> |
| 78 | + <Setter Target="ButtonBackgroundIcon.Glyph" Value="" /> |
| 79 | + <Setter Target="ButtonOutlineIcon.Glyph" Value="" /> |
| 80 | + <Setter Target="StatusProgress.IsActive" Value="False" /> |
| 81 | + </VisualState.Setters> |
| 82 | + </VisualState> |
| 83 | + <!-- |
| 84 | + <VisualState x:Name="Running"> |
| 85 | + <VisualState.Setters> |
| 86 | + <Setter Target="ButtonBackgroundIcon.Glyph" Value=" " /> |
| 87 | + <Setter Target="ButtonOutlineIcon.Glyph" Value=" " /> |
| 88 | + <Setter Target="StatusProgress.IsActive" Value="True" /> |
| 89 | + </VisualState.Setters> |
| 90 | + </VisualState> |
| 91 | +
|
| 92 | + <VisualState x:Name="AlreadyRan"> |
| 93 | + <VisualState.Setters> |
| 94 | + <Setter Target="ButtonBackgroundIcon.Glyph" Value="" /> |
| 95 | + <Setter Target="ButtonOutlineIcon.Glyph" Value="" /> |
| 96 | + <Setter Target="StatusProgress.IsActive" Value="False" /> |
| 97 | + </VisualState.Setters> |
| 98 | + </VisualState>--> |
| 99 | + </VisualStateGroup> |
| 100 | + |
| 101 | + </VisualStateManager.VisualStateGroups> |
| 102 | + </Border> |
| 103 | + </ControlTemplate> |
| 104 | + </Setter.Value> |
| 105 | + </Setter> |
| 106 | + |
| 107 | + </Style> |
| 108 | + |
23 | 109 | <DataTemplate x:Key="TaskItemTemplate"
|
24 | 110 | x:DataType="local:FilteredTask">
|
25 | 111 | <mux:TreeViewItem x:Name="rootItem"
|
|
52 | 138 | Background="Transparent"
|
53 | 139 | BorderBrush="Transparent"
|
54 | 140 | Click="_runCommandButtonClicked"
|
| 141 | + Style="{StaticResource PlayButtonTemplate}" |
55 | 142 | Visibility="{x:Bind mtu:Converters.InvertedBooleanToVisibility(HasChildren), Mode=OneWay}">
|
56 | 143 |
|
57 | 144 | <Button.Content>
|
|
118 | 205 | <!-- same as in MainPage, this is SolidBackgroundFillColorTertiary -->
|
119 | 206 | <ResourceDictionary x:Key="Dark">
|
120 | 207 | <Color x:Key="PageBackground">#282828</Color>
|
| 208 | + <Color x:Key="PlayButtonHoveredColor">#90ef90</Color> |
| 209 | + <Color x:Key="PlayButtonNormalColor">#8888</Color> |
121 | 210 | </ResourceDictionary>
|
122 | 211 | <ResourceDictionary x:Key="Light">
|
123 | 212 | <Color x:Key="PageBackground">#F9F9F9</Color>
|
| 213 | + <Color x:Key="PlayButtonHoveredColor">#257f01</Color> |
| 214 | + <Color x:Key="PlayButtonNormalColor">#88222222</Color> |
124 | 215 | </ResourceDictionary>
|
125 | 216 | <ResourceDictionary x:Key="HighContrast">
|
126 | 217 | <!-- Define resources for HighContrast mode here -->
|
|
0 commit comments