|
411 | 411 | <Setter Property="Template"> |
412 | 412 | <Setter.Value> |
413 | 413 | <ControlTemplate TargetType="RepeatButton"> |
414 | | - <ContentPresenter Content="{TemplateBinding Content}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" /> |
| 414 | + <ContentPresenter Content="{TemplateBinding Content}" Height="{TemplateBinding ActualHeight}" Width="{TemplateBinding ActualWidth}" /> |
415 | 415 | </ControlTemplate> |
416 | 416 | </Setter.Value> |
417 | 417 | </Setter> |
|
1433 | 1433 | </ControlTemplate> |
1434 | 1434 | <ControlTemplate x:Key="CompareSliderHorizontal" TargetType="hc:CompareSlider"> |
1435 | 1435 | <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"> |
1436 | | - <hc:CompareTrack Margin="-14,0,-15,0" x:Name="PART_Track"> |
| 1436 | + <hc:CompareTrack x:Name="PART_Track"> |
1437 | 1437 | <Track.DecreaseRepeatButton> |
1438 | | - <RepeatButton Margin="14,0,-15,0" Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}"> |
1439 | | - <RepeatButton.Content> |
1440 | | - <Border HorizontalAlignment="Left" Width="{TemplateBinding Width}"> |
1441 | | - <ContentPresenter Content="{TemplateBinding TargetContent}" /> |
1442 | | - </Border> |
1443 | | - </RepeatButton.Content> |
| 1438 | + <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}"> |
| 1439 | + <ContentPresenter ContentSource="TargetContent" HorizontalAlignment="Left" Width="{TemplateBinding ActualWidth}" /> |
1444 | 1440 | </RepeatButton> |
1445 | 1441 | </Track.DecreaseRepeatButton> |
1446 | 1442 | <Track.IncreaseRepeatButton> |
1447 | | - <RepeatButton Margin="-15,0,15,0" Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}"> |
1448 | | - <RepeatButton.Content> |
1449 | | - <Border HorizontalAlignment="Right" Width="{TemplateBinding ActualWidth}"> |
1450 | | - <ContentPresenter Content="{TemplateBinding SourceContent}" /> |
1451 | | - </Border> |
1452 | | - </RepeatButton.Content> |
| 1443 | + <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}"> |
| 1444 | + <ContentPresenter ContentSource="SourceContent" HorizontalAlignment="Right" Width="{TemplateBinding ActualWidth}" /> |
1453 | 1445 | </RepeatButton> |
1454 | 1446 | </Track.IncreaseRepeatButton> |
1455 | 1447 | <Track.Thumb> |
1456 | | - <Thumb x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource CompareSliderThumbHorizontal}" Width="30" Margin="0,0,0,0" /> |
| 1448 | + <Thumb x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource CompareSliderThumbHorizontal}" Width="30" Margin="-15,0" /> |
1457 | 1449 | </Track.Thumb> |
1458 | 1450 | </hc:CompareTrack> |
1459 | 1451 | </Border> |
|
1535 | 1527 | </ControlTemplate> |
1536 | 1528 | <ControlTemplate x:Key="CompareSliderVertical" TargetType="hc:CompareSlider"> |
1537 | 1529 | <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"> |
1538 | | - <hc:CompareTrack Margin="0,-14,0,-15" x:Name="PART_Track"> |
| 1530 | + <hc:CompareTrack x:Name="PART_Track"> |
1539 | 1531 | <Track.DecreaseRepeatButton> |
1540 | | - <RepeatButton Margin="0,-15,0,15" Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}"> |
1541 | | - <RepeatButton.Content> |
1542 | | - <Border VerticalAlignment="Bottom" Height="{TemplateBinding Height}"> |
1543 | | - <ContentPresenter Content="{TemplateBinding TargetContent}" /> |
1544 | | - </Border> |
1545 | | - </RepeatButton.Content> |
| 1532 | + <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}"> |
| 1533 | + <ContentPresenter ContentSource="TargetContent" VerticalAlignment="Bottom" Height="{TemplateBinding ActualHeight}" /> |
1546 | 1534 | </RepeatButton> |
1547 | 1535 | </Track.DecreaseRepeatButton> |
1548 | 1536 | <Track.IncreaseRepeatButton> |
1549 | | - <RepeatButton Margin="0,14,0,-15" Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}"> |
1550 | | - <RepeatButton.Content> |
1551 | | - <Border VerticalAlignment="Top" Height="{TemplateBinding Height}"> |
1552 | | - <ContentPresenter Content="{TemplateBinding SourceContent}" /> |
1553 | | - </Border> |
1554 | | - </RepeatButton.Content> |
| 1537 | + <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}"> |
| 1538 | + <ContentPresenter ContentSource="SourceContent" VerticalAlignment="Top" Height="{TemplateBinding ActualHeight}" /> |
1555 | 1539 | </RepeatButton> |
1556 | 1540 | </Track.IncreaseRepeatButton> |
1557 | 1541 | <Track.Thumb> |
1558 | | - <Thumb x:Name="Thumb" Focusable="False" Height="30" OverridesDefaultStyle="True" Template="{StaticResource CompareSliderThumbVertical}" VerticalAlignment="Top" /> |
| 1542 | + <Thumb x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource CompareSliderThumbVertical}" Height="30" Margin="0,-15" /> |
1559 | 1543 | </Track.Thumb> |
1560 | 1544 | </hc:CompareTrack> |
1561 | 1545 | </Border> |
|
0 commit comments