New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Win10 Slider style #3165

Merged
merged 8 commits into from Jan 23, 2018

Conversation

Projects
None yet
1 participant
@punker76
Member

punker76 commented Jan 21, 2018

What changed?

  • Add new attached properties for all possible Brushes to SliderHelper

Win10 Slider style

  • MahApps.Metro.Styles.Slider.Win10
  • Control template: MahApps.Metro.Styles.Slider.HorizontalTemplate.Win10, MahApps.Metro.Styles.Slider.VerticalTemplate.Win10
  • RepeatButton: MahApps.Metro.Styles.Slider.HorizontalTrack.Win10, MahApps.Metro.Styles.Slider.VerticalTrack.Win10
  • Thumb: MahApps.Metro.Styles.Slider.Thumb.Win10

2018-01-21_19h23_50

mahapps_slider_win10

Normal Slider style

  • MahApps.Metro.Styles.Slider
  • Control template: MahApps.Metro.Styles.Slider.HorizontalTemplate, MahApps.Metro.Styles.Slider.VerticalTemplate
  • RepeatButton: MahApps.Metro.Styles.Slider.HorizontalTrack, MahApps.Metro.Styles.Slider.VerticalTrack
  • Thumb: MahApps.Metro.Styles.Slider.Thumb

RangeSlider style

  • Add MahApps.Metro.Styles.RangeSlider key
  • Use SliderHelper brush properties also for RangeSlider
  • Thump styles for the middle part: MahApps.Metro.Styles.RangeSlider.HorizontalMiddleThumb, MahApps.Metro.Styles.RangeSlider.VerticalMiddleThumb
  • Use MetroThumb instead Thumb
  • Set ReservedSpace for all TickBar controls instead Margin

Win10 RangeSlider style

  • MahApps.Metro.Styles.RangeSlider.Win10
  • Control template: MahApps.Metro.Styles.RangeSlider.HorizontalTemplate.Win10, MahApps.Metro.Styles.RangeSlider.VerticalTemplate.Win10
  • RepeatButton: MahApps.Metro.Styles.Slider.HorizontalTrack.Win10, MahApps.Metro.Styles.Slider.VerticalTrack.Win10
  • Thumb: MahApps.Metro.Styles.Slider.Thumb.Win10, MahApps.Metro.Styles.RangeSlider.HorizontalMiddleThumb.Win10, MahApps.Metro.Styles.RangeSlider.VerticalMiddleThumb.Win10

mahapps_rangeslider_win10

Default Win10 Slider brushes via SliderHelper dependency properties

SliderHelper.ThumbFillBrush default AccentBaseColorBrush
SliderHelper.ThumbFillHoverBrush default GrayBrush3
SliderHelper.ThumbFillPressedBrush default AccentBaseColorBrush
SliderHelper.ThumbFillDisabledBrush default GrayBrush1
SliderHelper.TrackFillBrush default GrayBrush2
SliderHelper.TrackFillHoverBrush default AccentBaseColorBrush
SliderHelper.TrackFillPressedBrush default GrayBrush6
SliderHelper.TrackFillDisabledBrush default GrayBrush3
SliderHelper.TrackValueFillBrush default AccentBaseColorBrush
SliderHelper.TrackValueFillHoverBrush default GrayBrush6
SliderHelper.TrackValueFillPressedBrush default GrayBrush6
SliderHelper.TrackValueFillDisabledBrush default GrayBrush6

Default Slider brushes via SliderHelper dependency properties

SliderHelper.ThumbFillBrush default GrayBrush2
SliderHelper.ThumbFillHoverBrush default GrayBrush3
SliderHelper.ThumbFillPressedBrush default AccentColorBrush
SliderHelper.ThumbFillDisabledBrush default GrayBrush5
SliderHelper.TrackFillBrush default GrayBrush3
SliderHelper.TrackFillHoverBrush default AccentColorBrush
SliderHelper.TrackFillPressedBrush default GrayBrush2
SliderHelper.TrackFillDisabledBrush default GrayBrush3
SliderHelper.TrackValueFillBrush default AccentColorBrush
SliderHelper.TrackValueFillHoverBrush default GrayBrush6
SliderHelper.TrackValueFillPressedBrush default GrayBrush6
SliderHelper.TrackValueFillDisabledBrush default GrayBrush6

Add new Win10 Slider style
  - Style: `MahApps.Metro.Styles.Slider.Win10`
  - Control template: `MahApps.Metro.Styles.Slider.HorizontalTemplate.Win10`, `MahApps.Metro.Styles.Slider.VerticalTemplate.Win10`
  - RepeatButton: `MahApps.Metro.Styles.Slider.HorizontalTrack.Win10`, `MahApps.Metro.Styles.Slider.VerticalTrack.Win10`
  - Thumb: `MahApps.Metro.Styles.Slider.Thumb.Win10`

@punker76 punker76 added this to the 1.6.0 milestone Jan 21, 2018

@punker76 punker76 self-assigned this Jan 21, 2018

punker76 added some commits Jan 21, 2018

Add new Slider style and mark old as obsolete
  - Style: `MahApps.Metro.Styles.Slider`
  - Control template: `MahApps.Metro.Styles.Slider.HorizontalTemplate`, `MahApps.Metro.Styles.Slider.VerticalTemplate`
  - RepeatButton: `MahApps.Metro.Styles.Slider.HorizontalTrack`, `MahApps.Metro.Styles.Slider.VerticalTrack`
  - Thumb: `MahApps.Metro.Styles.Slider.Thumb`
  - Brushes:
`MahApps.Metro.Brushes.SliderThumbBackground` default `Gray2`
`MahApps.Metro.Brushes.SliderTrackFill` default `Gray3`
`MahApps.Metro.Brushes.SliderTrackValueFill` default `AccentColor`

`MahApps.Metro.Brushes.SliderThumbBackgroundMouseOver` default `Gray5`
`MahApps.Metro.Brushes.SliderTrackFillMouseOver` default `Gray3`
`MahApps.Metro.Brushes.SliderTrackValueFillMouseOver` default `AccentColor`

`MahApps.Metro.Brushes.SliderThumbBackgroundPressed` default `Gray2`
`MahApps.Metro.Brushes.SliderTrackFillPressed` default `Gray3`
`MahApps.Metro.Brushes.SliderTrackValueFillPressed` default `AccentColor`

`MahApps.Metro.Brushes.SliderThumbBackgroundDisabled` default `Gray6`
`MahApps.Metro.Brushes.SliderTrackFillDisabled` default `Gray6`
`MahApps.Metro.Brushes.SliderTrackValueFillDisabled` default `Gray6`
Add `MahApps.Metro.Styles.RangeSlider` key
Use `SliderHelper` brush properties also for RangeSlider
- Thump style for the middle part: `MahApps.Metro.Styles.RangeSlider.…
…HorizontalMiddleThumb`, `MahApps.Metro.Styles.RangeSlider.VerticalMiddleThumb`

- Use `MetroThumb` instead `Thumb`
- Set ReservedSpace for all TickBar controls instead Margin

@punker76 punker76 merged commit 04b38ce into develop Jan 23, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@punker76 punker76 deleted the feature/Slider_Win10_Style branch Jan 23, 2018

@punker76 punker76 added the Feature label Feb 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment