|
30 | 30 |
|
31 | 31 | <SolidColorBrush x:Key="AttentionToActionBrush" Color="{StaticResource MaterialDesignShadow}" Opacity=".23" po:Freeze="True" />
|
32 | 32 |
|
| 33 | + <!--#region Raised Button--> |
| 34 | + |
33 | 35 | <Style x:Key="MaterialDesignRaisedButton" TargetType="{x:Type ButtonBase}">
|
34 | 36 | <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
35 | 37 | <Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}"/>
|
36 | 38 | <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}"/>
|
37 | 39 | <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
|
38 |
| - <Setter Property="wpf:ButtonProgressAssist.IndicatorForeground" Value="{DynamicResource PrimaryHueMidForegroundBrush}" /> |
39 |
| - <Setter Property="wpf:ButtonProgressAssist.IndicatorBackground" Value="{DynamicResource PrimaryHueMidBrush}" /> |
40 |
| - <Setter Property="wpf:RippleAssist.Feedback" Value="White" /> |
41 | 40 | <Setter Property="Cursor" Value="Hand"/>
|
42 |
| - <Setter Property="wpf:ShadowAssist.ShadowDepth" Value="Depth1" /> |
43 | 41 | <Setter Property="TextBlock.FontWeight" Value="Medium"/>
|
44 | 42 | <Setter Property="TextBlock.FontSize" Value="14"/>
|
45 | 43 | <Setter Property="BorderThickness" Value="1"/>
|
46 | 44 | <Setter Property="HorizontalContentAlignment" Value="Center"/>
|
47 | 45 | <Setter Property="VerticalContentAlignment" Value="Center"/>
|
48 | 46 | <Setter Property="Padding" Value="16 4 16 4"/>
|
49 | 47 | <Setter Property="Height" Value="32" />
|
| 48 | + <Setter Property="wpf:ShadowAssist.ShadowDepth" Value="Depth1" /> |
| 49 | + <Setter Property="wpf:ButtonAssist.CornerRadius" Value="2" /> |
| 50 | + <Setter Property="wpf:RippleAssist.Feedback" Value="White" /> |
| 51 | + <Setter Property="wpf:ButtonProgressAssist.IndicatorForeground" Value="{DynamicResource PrimaryHueMidForegroundBrush}" /> |
| 52 | + <Setter Property="wpf:ButtonProgressAssist.IndicatorBackground" Value="{DynamicResource PrimaryHueMidBrush}" /> |
50 | 53 | <Setter Property="wpf:ButtonProgressAssist.IsIndicatorVisible" Value="False" />
|
51 | 54 | <Setter Property="wpf:ButtonProgressAssist.Opacity" Value=".4" />
|
52 |
| - <Setter Property="wpf:ButtonAssist.CornerRadius" Value="2" /> |
53 |
| - |
54 | 55 | <Setter Property="Template">
|
55 | 56 | <Setter.Value>
|
56 | 57 | <ControlTemplate TargetType="{x:Type ButtonBase}">
|
|
154 | 155 | <Style x:Key="MaterialDesignRaisedAccentButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignRaisedSecondaryButton}">
|
155 | 156 | </Style>
|
156 | 157 |
|
| 158 | + <!--#endregion--> |
| 159 | + <!--#region Flat Button--> |
157 | 160 | <Style x:Key="MaterialDesignFlatButton" TargetType="{x:Type ButtonBase}">
|
158 | 161 | <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
159 | 162 | <Setter Property="Background" Value="Transparent"/>
|
160 | 163 | <Setter Property="BorderBrush" Value="Transparent"/>
|
161 | 164 | <Setter Property="Cursor" Value="Hand"/>
|
162 | 165 | <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidBrush}"/>
|
163 |
| - <Setter Property="wpf:RippleAssist.Feedback" Value="{DynamicResource PrimaryHueMidBrush}" /> |
164 | 166 | <Setter Property="TextBlock.FontWeight" Value="Medium"/>
|
165 | 167 | <Setter Property="TextBlock.FontSize" Value="14"/>
|
166 | 168 | <Setter Property="BorderThickness" Value="0"/>
|
167 | 169 | <Setter Property="HorizontalContentAlignment" Value="Center"/>
|
168 | 170 | <Setter Property="VerticalContentAlignment" Value="Center"/>
|
169 | 171 | <Setter Property="Padding" Value="16 4 16 4"/>
|
170 | 172 | <Setter Property="Height" Value="32" />
|
| 173 | + <Setter Property="wpf:ButtonAssist.CornerRadius" Value="2" /> |
| 174 | + <Setter Property="wpf:RippleAssist.Feedback" Value="{DynamicResource PrimaryHueMidBrush}" /> |
| 175 | + <Setter Property="wpf:ButtonProgressAssist.IndicatorForeground" Value="{DynamicResource PrimaryHueMidForegroundBrush}" /> |
| 176 | + <Setter Property="wpf:ButtonProgressAssist.IndicatorBackground" Value="{DynamicResource PrimaryHueMidBrush}" /> |
| 177 | + <Setter Property="wpf:ButtonProgressAssist.IsIndicatorVisible" Value="False" /> |
| 178 | + <Setter Property="wpf:ButtonProgressAssist.Opacity" Value=".4" /> |
171 | 179 | <Setter Property="Template">
|
172 | 180 | <Setter.Value>
|
173 | 181 | <ControlTemplate TargetType="{x:Type ButtonBase}">
|
174 | 182 | <Grid>
|
175 | 183 | <Border Background="{TemplateBinding Background}" x:Name="border"
|
176 | 184 | CornerRadius="{Binding Path=(wpf:ButtonAssist.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
177 | 185 | BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
178 |
| - <wpf:Ripple Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Focusable="False" |
| 186 | + <ProgressBar x:Name="ProgressBar" |
| 187 | + Style="{DynamicResource MaterialDesignLinearProgressBar}" |
| 188 | + Minimum="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.Minimum)}" |
| 189 | + Maximum="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.Maximum)}" |
| 190 | + Foreground="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IndicatorForeground)}" |
| 191 | + Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IndicatorBackground)}" |
| 192 | + BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IndicatorBackground)}" |
| 193 | + Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.Value)}" |
| 194 | + IsIndeterminate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IsIndeterminate)}" |
| 195 | + Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IsIndicatorVisible), Converter={StaticResource BooleanToVisibilityConverter}}" |
| 196 | + Height="{TemplateBinding Height}" |
| 197 | + Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}, Path=ActualWidth}" |
| 198 | + Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.Opacity)}" |
| 199 | + HorizontalAlignment="Left" |
| 200 | + VerticalAlignment="Center"> |
| 201 | + <ProgressBar.Clip> |
| 202 | + <MultiBinding Converter="{StaticResource BorderClipConverter}"> |
| 203 | + <Binding ElementName="border" Path="ActualWidth" /> |
| 204 | + <Binding ElementName="border" Path="ActualHeight" /> |
| 205 | + <Binding ElementName="border" Path="CornerRadius" /> |
| 206 | + <Binding ElementName="border" Path="BorderThickness" /> |
| 207 | + </MultiBinding> |
| 208 | + </ProgressBar.Clip> |
| 209 | + </ProgressBar> |
| 210 | + </Border> |
| 211 | + <wpf:Ripple Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Focusable="False" |
179 | 212 | ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
180 | 213 | HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
181 | 214 | VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
190 | 223 | </MultiBinding>
|
191 | 224 | </wpf:Ripple.Clip>
|
192 | 225 | </wpf:Ripple>
|
193 |
| - </Border> |
194 | 226 | </Grid>
|
195 | 227 | <ControlTemplate.Triggers>
|
196 | 228 | <Trigger Property="IsMouseOver" Value="true">
|
|
208 | 240 | </Setter>
|
209 | 241 | </Style>
|
210 | 242 |
|
211 |
| - |
212 |
| - |
213 | 243 | <Style x:Key="MaterialDesignFlatLightButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignFlatButton}">
|
214 | 244 | <Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightBrush}"/>
|
215 | 245 | <Setter Property="wpf:RippleAssist.Feedback" Value="{DynamicResource PrimaryHueLightBrush}"/>
|
|
242 | 272 | <Setter Property="wpf:ShadowAssist.ShadowDepth" Value="Depth0" />
|
243 | 273 | </Style>
|
244 | 274 |
|
| 275 | + <!--#endregion--> |
| 276 | + <!--#region Flat Background Button--> |
| 277 | + |
245 | 278 | <Style x:Key="MaterialDesignFlatMidBgButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignRaisedButton}">
|
246 | 279 | <Setter Property="wpf:ShadowAssist.ShadowDepth" Value="Depth0" />
|
247 | 280 | </Style>
|
|
265 | 298 | <Style x:Key="MaterialDesignFlatAccentBgButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignFlatSecondaryMidBgButton}">
|
266 | 299 | </Style>
|
267 | 300 |
|
| 301 | + <!--#endregion--> |
| 302 | + <!--#region Outlined Button--> |
| 303 | + |
268 | 304 | <Style x:Key="MaterialDesignOutlinedButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignFlatButton}">
|
269 | 305 | <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}"/>
|
270 | 306 | <Setter Property="BorderThickness" Value="1"/>
|
|
278 | 314 | CornerRadius="{Binding Path=(wpf:ButtonAssist.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
279 | 315 | BorderBrush="{TemplateBinding BorderBrush}"
|
280 | 316 | BorderThickness="{TemplateBinding BorderThickness}">
|
281 |
| - <wpf:Ripple Content="{TemplateBinding Content}" |
282 |
| - ContentTemplate="{TemplateBinding ContentTemplate}" |
283 |
| - Focusable="False" |
284 |
| - ContentStringFormat="{TemplateBinding ContentStringFormat}" |
285 |
| - HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
286 |
| - VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
287 |
| - Padding="{TemplateBinding Padding}" |
288 |
| - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"> |
289 |
| - <wpf:Ripple.Clip> |
| 317 | + <ProgressBar x:Name="ProgressBar" |
| 318 | + Style="{DynamicResource MaterialDesignLinearProgressBar}" |
| 319 | + Minimum="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.Minimum)}" |
| 320 | + Maximum="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.Maximum)}" |
| 321 | + Foreground="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IndicatorForeground)}" |
| 322 | + Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IndicatorBackground)}" |
| 323 | + BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IndicatorBackground)}" |
| 324 | + Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.Value)}" |
| 325 | + IsIndeterminate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IsIndeterminate)}" |
| 326 | + Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.IsIndicatorVisible), Converter={StaticResource BooleanToVisibilityConverter}}" |
| 327 | + Height="{TemplateBinding Height}" |
| 328 | + Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}, Path=ActualWidth}" |
| 329 | + Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ButtonProgressAssist.Opacity)}" |
| 330 | + HorizontalAlignment="Left" |
| 331 | + VerticalAlignment="Center"> |
| 332 | + <ProgressBar.Clip> |
290 | 333 | <MultiBinding Converter="{StaticResource BorderClipConverter}">
|
291 | 334 | <Binding ElementName="border" Path="ActualWidth" />
|
292 | 335 | <Binding ElementName="border" Path="ActualHeight" />
|
293 | 336 | <Binding ElementName="border" Path="CornerRadius" />
|
294 | 337 | <Binding ElementName="border" Path="BorderThickness" />
|
295 | 338 | </MultiBinding>
|
296 |
| - </wpf:Ripple.Clip> |
297 |
| - </wpf:Ripple> |
| 339 | + </ProgressBar.Clip> |
| 340 | + </ProgressBar> |
298 | 341 | </Border>
|
| 342 | + <wpf:Ripple Content="{TemplateBinding Content}" |
| 343 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 344 | + Focusable="False" |
| 345 | + ContentStringFormat="{TemplateBinding ContentStringFormat}" |
| 346 | + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 347 | + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
| 348 | + Padding="{TemplateBinding Padding}" |
| 349 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"> |
| 350 | + <wpf:Ripple.Clip> |
| 351 | + <MultiBinding Converter="{StaticResource BorderClipConverter}"> |
| 352 | + <Binding ElementName="border" Path="ActualWidth" /> |
| 353 | + <Binding ElementName="border" Path="ActualHeight" /> |
| 354 | + <Binding ElementName="border" Path="CornerRadius" /> |
| 355 | + <Binding ElementName="border" Path="BorderThickness" /> |
| 356 | + </MultiBinding> |
| 357 | + </wpf:Ripple.Clip> |
| 358 | + </wpf:Ripple> |
299 | 359 | </Grid>
|
300 | 360 | <ControlTemplate.Triggers>
|
301 | 361 | <Trigger Property="IsMouseOver" Value="true">
|
|
344 | 404 | <Setter Property="wpf:RippleAssist.Feedback" Value="{DynamicResource SecondaryHueDarkBrush}"/>
|
345 | 405 | </Style>
|
346 | 406 |
|
| 407 | + <!--#endregion--> |
| 408 | + <!--#region Tool Button--> |
| 409 | + |
347 | 410 | <Style x:Key="MaterialDesignToolButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignFlatButton}">
|
348 | 411 | <Setter Property="Foreground" Value="{DynamicResource MaterialDesignToolForeground}"/>
|
349 | 412 | <Setter Property="Padding" Value="4"/>
|
|
372 | 435 | <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
|
373 | 436 | </Style>
|
374 | 437 |
|
| 438 | + <!--#endregion--> |
| 439 | + <!--#region FAB--> |
| 440 | + |
375 | 441 | <Style x:Key="MaterialDesignFloatingActionMiniButton" TargetType="{x:Type ButtonBase}">
|
376 | 442 | <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
377 | 443 | <Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}"/>
|
|
549 | 615 | <Style x:Key="MaterialDesignFloatingActionAccentButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignFloatingActionSecondaryButton}">
|
550 | 616 | </Style>
|
551 | 617 |
|
| 618 | + <!--#endregion--> |
| 619 | + <!--#region Icon Button--> |
| 620 | + |
552 | 621 | <Style x:Key="MaterialDesignIconButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignFlatButton}">
|
553 | 622 | <Setter Property="Padding" Value="0"/>
|
554 | 623 | <Setter Property="Width" Value="48" />
|
|
600 | 669 | <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
|
601 | 670 | </Style>
|
602 | 671 |
|
| 672 | + <!--#endregion--> |
| 673 | + <!--#region Paper Button--> |
| 674 | + |
603 | 675 | <Style x:Key="MaterialDesignPaperButton" TargetType="{x:Type ButtonBase}">
|
604 | 676 | <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
605 | 677 | <Setter Property="Background" Value="{DynamicResource MaterialDesignPaper}"/>
|
|
687 | 759 | <Setter Property="wpf:RippleAssist.Feedback" Value="{DynamicResource SecondaryHueDarkBrush}"/>
|
688 | 760 | </Style>
|
689 | 761 |
|
| 762 | + <!--#endregion--> |
| 763 | + |
690 | 764 | </ResourceDictionary>
|
0 commit comments