Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/windows/SliderWindows/SliderView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace winrt::SliderWindows::implementation {
}
else {
updatedMaxValue = true;
m_maxValue = propertyValue.AsInt64();
m_maxValue = propertyValue.AsDouble();
}
}
else if (propertyName == "minimumValue") {
Expand All @@ -89,16 +89,19 @@ namespace winrt::SliderWindows::implementation {
}
else {
updatedMinValue = true;
m_minValue = propertyValue.AsInt64();
m_minValue = propertyValue.AsDouble();
}
}
else if (propertyName == "step") {
if (propertyValue.IsNull()) {
this->ClearValue(xaml::Controls::Slider::StepFrequencyProperty());
}
else {
else if (propertyValue.AsDouble() != 0) {
this->StepFrequency(propertyValue.AsDouble());
}
else {
this->StepFrequency(c_stepDefault);
}
}
else if (propertyName == "inverted") {
if (propertyValue.IsNull()) {
Expand Down
4 changes: 2 additions & 2 deletions src/windows/SliderWindows/SliderView.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ namespace winrt::SliderWindows::implementation {
winrt::Windows::Foundation::IInspectable const& sender,
xaml::Input::ManipulationCompletedRoutedEventArgs const& args);

int64_t m_maxValue, m_minValue;
double m_value;
double m_value, m_maxValue, m_minValue;
const double c_stepDefault = 0.1;
};
}

Expand Down