File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
src/windows/SliderWindows Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ namespace winrt::SliderWindows::implementation {
8080 }
8181 else {
8282 updatedMaxValue = true ;
83- m_maxValue = propertyValue.AsInt64 ();
83+ m_maxValue = propertyValue.AsDouble ();
8484 }
8585 }
8686 else if (propertyName == " minimumValue" ) {
@@ -89,16 +89,19 @@ namespace winrt::SliderWindows::implementation {
8989 }
9090 else {
9191 updatedMinValue = true ;
92- m_minValue = propertyValue.AsInt64 ();
92+ m_minValue = propertyValue.AsDouble ();
9393 }
9494 }
9595 else if (propertyName == " step" ) {
9696 if (propertyValue.IsNull ()) {
9797 this ->ClearValue (xaml::Controls::Slider::StepFrequencyProperty ());
9898 }
99- else {
99+ else if (propertyValue. AsDouble () != 0 ) {
100100 this ->StepFrequency (propertyValue.AsDouble ());
101101 }
102+ else {
103+ this ->StepFrequency (c_stepDefault);
104+ }
102105 }
103106 else if (propertyName == " inverted" ) {
104107 if (propertyValue.IsNull ()) {
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ namespace winrt::SliderWindows::implementation {
3535 winrt::Windows::Foundation::IInspectable const & sender,
3636 xaml::Input::ManipulationCompletedRoutedEventArgs const & args);
3737
38- int64_t m_maxValue, m_minValue;
39- double m_value ;
38+ double m_value, m_maxValue, m_minValue;
39+ const double c_stepDefault = 0.1 ;
4040 };
4141}
4242
You can’t perform that action at this time.
0 commit comments