|
31 | 31 | </ControlTemplate> |
32 | 32 | </Setter> |
33 | 33 |
|
| 34 | + <Style Selector="^:focus-visible /template/ Border#PART_HoverEffect"> |
| 35 | + <Setter Property="Opacity" Value="0.20" /> |
| 36 | + </Style> |
| 37 | + |
34 | 38 | <Style Selector="^ /template/ Panel#PART_RootPanel"> |
35 | 39 | <Setter Property="HorizontalAlignment" Value="Center" /> |
36 | 40 | <Setter Property="VerticalAlignment" Value="Center" /> |
|
120 | 124 | Name="PART_Positioner"> |
121 | 125 | <Border Name="PART_ContentContainer"> |
122 | 126 | <!-- TODO: Fix positioner |
123 | | - Seems like TransformedBounds property is gone, we need something else that |
124 | | - can be refreshed at every frame and contains component position data --> |
| 127 | + Seems like TransformedBounds property is gone, we need something else that |
| 128 | + can be refreshed at every frame and contains component position data --> |
125 | 129 | <!-- |
126 | 130 | <Border.RenderTransform> |
127 | | - <MultiBinding Converter="{StaticResource AutoCorrectPositionConverter}"> |
128 | | - <Binding ElementName="PART_Positioner" Path="TransformedBounds" /> |
129 | | - <Binding Path="$parent[TopLevel].Bounds" /> |
130 | | - </MultiBinding> |
| 131 | + <MultiBinding Converter="{StaticResource AutoCorrectPositionConverter}"> |
| 132 | + <Binding ElementName="PART_Positioner" Path="TransformedBounds" /> |
| 133 | + <Binding Path="$parent[TopLevel].Bounds" /> |
| 134 | + </MultiBinding> |
131 | 135 | </Border.RenderTransform>--> |
132 | 136 |
|
133 | 137 | <ContentPresenter Name="PART_ContentPresenter" /> |
|
292 | 296 | <ControlTheme x:Key="MaterialSlider" TargetType="Slider"> |
293 | 297 | <Setter Property="Background" Value="Transparent" /> |
294 | 298 | <Setter Property="BorderBrush" Value="Transparent" /> |
| 299 | + <Setter Property="Focusable" Value="False"/> |
295 | 300 | <Setter Property="Foreground" Value="{DynamicResource MaterialPrimaryMidBrush}" /> |
296 | 301 | <Setter Property="ClipToBounds" Value="False" /> |
297 | 302 | <Setter Property="Template"> |
|
302 | 307 | BorderThickness="{TemplateBinding BorderThickness}"> |
303 | 308 | <Panel Name="PART_RootPanel"> |
304 | 309 | <!-- I have no idea how to reorder tick bar in between track and thumb |
305 | | - The tricky way might works by using ProgressBar as track (only visual, no hit test) |
306 | | - and then make transparent the track (the interactable one). --> |
| 310 | + The tricky way might works by using ProgressBar as track (only visual, no hit test) |
| 311 | + and then make transparent the track (the interactable one). --> |
307 | 312 | <ProgressBar Name="PART_ProgressLayer" |
308 | 313 | Minimum="{TemplateBinding Minimum}" |
309 | 314 | Maximum="{TemplateBinding Maximum}" |
|
324 | 329 | Minimum="{TemplateBinding Minimum}" |
325 | 330 | Value="{TemplateBinding Value}"> |
326 | 331 | <Track.DecreaseButton> |
327 | | - <RepeatButton Name="PART_DecreaseButton" Theme="{StaticResource MaterialEmptyRepeatButton}" /> |
| 332 | + <RepeatButton Name="PART_DecreaseButton" Theme="{StaticResource MaterialEmptyRepeatButton}" |
| 333 | + Focusable="False"/> |
328 | 334 | </Track.DecreaseButton> |
329 | 335 | <Track.IncreaseButton> |
330 | | - <RepeatButton Name="PART_IncreaseButton" Theme="{StaticResource MaterialEmptyRepeatButton}" /> |
| 336 | + <RepeatButton Name="PART_IncreaseButton" Theme="{StaticResource MaterialEmptyRepeatButton}" |
| 337 | + Focusable="False"/> |
331 | 338 | </Track.IncreaseButton> |
332 | 339 | <Track.Thumb> |
333 | | - <Thumb Name="PART_SliderThumb" /> |
| 340 | + <Thumb Name="PART_SliderThumb" |
| 341 | + Focusable="True"/> |
334 | 342 | </Track.Thumb> |
335 | 343 | </Track> |
336 | 344 | </Panel> |
|
420 | 428 | <Setter Property="ActiveBrush" Value="{DynamicResource MaterialCardBackgroundBrush}" /> |
421 | 429 | </Style> |
422 | 430 | </ControlTheme> |
423 | | - |
| 431 | + |
424 | 432 | <ControlTheme x:Key="{x:Type Slider}" TargetType="Slider" |
425 | 433 | BasedOn="{StaticResource MaterialSlider}" /> |
426 | 434 |
|
|
471 | 479 | </Setter> |
472 | 480 | </Style> |
473 | 481 |
|
| 482 | + <Style Selector="^:focus /template/ Ellipse#PART_HoverEffect"> |
| 483 | + <Setter Property="Opacity" Value="0.20" /> |
| 484 | + </Style> |
| 485 | + |
474 | 486 | <Style Selector="^:pointerover /template/ Ellipse#PART_HoverEffect"> |
475 | 487 | <Setter Property="Opacity" Value="0.24" /> |
476 | 488 | </Style> |
|
507 | 519 | <!-- Legacy slider theme (material v1, refer link: https://material.io/archive/guidelines/components/sliders.html) --> |
508 | 520 | <ControlTheme x:Key="MaterialSliderV1" |
509 | 521 | TargetType="Slider"> |
| 522 | + <Setter Property="Focusable" Value="False"/> |
510 | 523 | <Setter Property="Template"> |
511 | 524 | <ControlTemplate> |
512 | 525 | <Border Name="PART_RootBorder" |
|
521 | 534 | Maximum="{TemplateBinding Maximum}" |
522 | 535 | Value="{TemplateBinding Value}"> |
523 | 536 | <Track.DecreaseButton> |
524 | | - <RepeatButton Name="PART_DecreaseButton" Theme="{StaticResource MaterialEmptyRepeatButton}" /> |
| 537 | + <RepeatButton Name="PART_DecreaseButton" Theme="{StaticResource MaterialEmptyRepeatButton}"/> |
525 | 538 | </Track.DecreaseButton> |
526 | 539 | <Track.IncreaseButton> |
527 | | - <RepeatButton Name="PART_IncreaseButton" Theme="{StaticResource MaterialEmptyRepeatButton}" /> |
| 540 | + <RepeatButton Name="PART_IncreaseButton" Theme="{StaticResource MaterialEmptyRepeatButton}"/> |
528 | 541 | </Track.IncreaseButton> |
529 | 542 | <Track.Thumb> |
530 | | - <Thumb Name="PART_SliderThumb" /> |
| 543 | + <Thumb Name="PART_SliderThumb"/> |
531 | 544 | </Track.Thumb> |
532 | 545 | </Track> |
533 | 546 | </Panel> |
|
0 commit comments