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 {
80
80
}
81
81
else {
82
82
updatedMaxValue = true ;
83
- m_maxValue = propertyValue.AsInt64 ();
83
+ m_maxValue = propertyValue.AsDouble ();
84
84
}
85
85
}
86
86
else if (propertyName == " minimumValue" ) {
@@ -89,16 +89,19 @@ namespace winrt::SliderWindows::implementation {
89
89
}
90
90
else {
91
91
updatedMinValue = true ;
92
- m_minValue = propertyValue.AsInt64 ();
92
+ m_minValue = propertyValue.AsDouble ();
93
93
}
94
94
}
95
95
else if (propertyName == " step" ) {
96
96
if (propertyValue.IsNull ()) {
97
97
this ->ClearValue (xaml::Controls::Slider::StepFrequencyProperty ());
98
98
}
99
- else {
99
+ else if (propertyValue. AsDouble () != 0 ) {
100
100
this ->StepFrequency (propertyValue.AsDouble ());
101
101
}
102
+ else {
103
+ this ->StepFrequency (c_stepDefault);
104
+ }
102
105
}
103
106
else if (propertyName == " inverted" ) {
104
107
if (propertyValue.IsNull ()) {
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ namespace winrt::SliderWindows::implementation {
35
35
winrt::Windows::Foundation::IInspectable const & sender,
36
36
xaml::Input::ManipulationCompletedRoutedEventArgs const & args);
37
37
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 ;
40
40
};
41
41
}
42
42
You can’t perform that action at this time.
0 commit comments