38 private bool reduceMotion;
39 private double durationScale = 1.0;
54 throw new ArgumentOutOfRangeException(nameof(
DurationScale),
"Duration scale must be greater than zero.");
56 bool ReduceMotionChanged = this.reduceMotion !=
ReduceMotion;
57 bool DurationChanged = Math.Abs(this.durationScale -
DurationScale) >
double.Epsilon;
59 if (!ReduceMotionChanged && !DurationChanged)
65 this.MotionSettingsChanged?.Invoke(
this, EventArgs.Empty);
Default implementation of IMotionSettings.
double DurationScale
Gets the multiplier applied to animation durations.
EventHandler? MotionSettingsChanged
void Update(bool ReduceMotion, double DurationScale)
Updates the motion settings.
bool ReduceMotion
Gets a value indicating whether reduce-motion is enabled.
Represents motion preferences that affect animation execution.
void Update(bool ReduceMotion, double DurationScale)
Updates the motion settings.
EventHandler? MotionSettingsChanged
Event raised when settings change.
bool ReduceMotion
Gets a value indicating whether reduce-motion is enabled.
double DurationScale
Gets the multiplier applied to animation durations.