3using Microsoft.Maui.Devices;
71 public string?
Theme {
get; init; }
112 if (
string.IsNullOrWhiteSpace(
Platform))
113 throw new ArgumentException(
"Platform cannot be null or whitespace.", nameof(
Platform));
183 string Platform = EffectiveOptions.Platform ?? DeviceInfo.
Platform.ToString();
184 string? Theme = EffectiveOptions.
Theme;
185 Thickness SafeArea = EffectiveOptions.SafeAreaInsets ?? Thickness.Zero;
186 double KeyboardInset = EffectiveOptions.KeyboardInset ?? 0;
187 double ViewportWidth = EffectiveOptions.ViewportWidth ?? 0;
188 double ViewportHeight = EffectiveOptions.ViewportHeight ?? 0;
189 bool ReduceMotion = this.motionSettings.ReduceMotion;
190 double DurationScale = this.motionSettings.DurationScale;
191 return new AnimationContext(Platform, Theme, SafeArea, KeyboardInset, ViewportWidth, ViewportHeight, ReduceMotion, DurationScale);
Concrete snapshot of contextual data used during animation execution.
string? Theme
Gets the optional theme key associated with the animation request.
string Platform
Gets the platform identifier (e.g., Android, iOS, WinUI).
bool ReduceMotion
Gets a value indicating whether the caller requests reduced motion.
double KeyboardInset
Gets the active keyboard inset height in device-independent units.
Thickness SafeAreaInsets
Gets the safe-area insets active for the request.
double ViewportWidth
Gets the available viewport width for the animation.
double DurationScale
Gets the multiplier applied to animation durations.
AnimationContext(string Platform, string? Theme, Thickness SafeAreaInsets, double KeyboardInset, double ViewportWidth, double ViewportHeight, bool ReduceMotion, double DurationScale)
Initializes a new instance of the AnimationContext class.
double ViewportHeight
Gets the available viewport height for the animation.
Data structure used when building animation contexts.
Thickness? SafeAreaInsets
Gets or sets an optional safe-area inset value.
static AnimationContextOptions Default
Gets a default instance with no overrides.
double? ViewportWidth
Gets or sets an optional viewport width value.
double? ViewportHeight
Gets or sets an optional viewport height value.
string? Theme
Gets or sets an optional theme identifier.
string? Platform
Gets or sets an optional platform override.
double? KeyboardInset
Gets or sets an optional keyboard inset height.
Default implementation of IAnimationContextProvider.
AnimationContextProvider(IMotionSettings MotionSettings)
Initializes a new instance of the AnimationContextProvider class.
IAnimationContext CreateContext(AnimationContextOptions? Options)
Builds a context instance using provided options. Created context instance.
Default implementation of IMotionSettings.
Represents contextual information required when executing an animation.
string Platform
Gets the platform identifier (e.g., Android, iOS, WinUI).
double KeyboardInset
Gets the active keyboard inset height in device-independent units.
bool ReduceMotion
Gets a value indicating whether the caller requests reduced motion.
string? Theme
Gets the optional theme key associated with the animation request.
double ViewportWidth
Gets the available viewport width for the animation.
Thickness SafeAreaInsets
Gets the safe-area insets active for the request.
double DurationScale
Gets the multiplier applied to animation durations.
double ViewportHeight
Gets the available viewport height for the animation.
Factory abstraction responsible for constructing animation contexts.
IAnimationContext CreateContext(AnimationContextOptions? Options)
Builds a context instance using provided options.
Represents motion preferences that affect animation execution.