Fixed files: - SkiaImageButton.cs: Added SVG support with multi-path search - SkiaNavigationPage.cs: Added LinuxApplication.IsGtkMode check - SkiaRefreshView.cs: Added ICommand support (Command, CommandParameter) - SkiaTemplatedView.cs: Added missing using statements Extracted embedded types to separate files (matching decompiled pattern): - From SkiaMenuBar.cs: MenuBarItem, MenuItem, SkiaMenuFlyout, MenuItemClickedEventArgs - From SkiaNavigationPage.cs: NavigationEventArgs - From SkiaTabbedPage.cs: TabItem - From SkiaVisualStateManager.cs: SkiaVisualStateGroupList, SkiaVisualStateGroup, SkiaVisualState, SkiaVisualStateSetter - From SkiaSwipeView.cs: SwipeItem, SwipeStartedEventArgs, SwipeEndedEventArgs - From SkiaFlyoutPage.cs: FlyoutLayoutBehavior (already separate) - From SkiaIndicatorView.cs: IndicatorShape (already separate) - From SkiaBorder.cs: SkiaFrame - From SkiaCarouselView.cs: PositionChangedEventArgs - From SkiaCollectionView.cs: SkiaSelectionMode, ItemsLayoutOrientation - From SkiaContentPresenter.cs: LayoutAlignment Verified matching decompiled: - SkiaContextMenu.cs, SkiaFlexLayout.cs, SkiaGraphicsView.cs Build: 0 errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
68 lines
2.8 KiB
C#
68 lines
2.8 KiB
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
|
|
namespace Microsoft.Maui.Platform.Linux;
|
|
|
|
public static class SkiaViewAnimationExtensions
|
|
{
|
|
public static Task<bool> FadeTo(this SkiaView view, double opacity, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.Opacity), opacity, length, easing);
|
|
}
|
|
|
|
public static Task<bool> ScaleTo(this SkiaView view, double scale, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.Scale), scale, length, easing);
|
|
}
|
|
|
|
public static Task<bool> ScaleXTo(this SkiaView view, double scale, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.ScaleX), scale, length, easing);
|
|
}
|
|
|
|
public static Task<bool> ScaleYTo(this SkiaView view, double scale, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.ScaleY), scale, length, easing);
|
|
}
|
|
|
|
public static Task<bool> RotateTo(this SkiaView view, double rotation, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.Rotation), rotation, length, easing);
|
|
}
|
|
|
|
public static Task<bool> RotateXTo(this SkiaView view, double rotation, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.RotationX), rotation, length, easing);
|
|
}
|
|
|
|
public static Task<bool> RotateYTo(this SkiaView view, double rotation, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.RotationY), rotation, length, easing);
|
|
}
|
|
|
|
public static async Task<bool> TranslateTo(this SkiaView view, double x, double y, uint length = 250, Easing? easing = null)
|
|
{
|
|
var taskX = AnimationManager.AnimateAsync(view, nameof(SkiaView.TranslationX), x, length, easing);
|
|
var taskY = AnimationManager.AnimateAsync(view, nameof(SkiaView.TranslationY), y, length, easing);
|
|
|
|
await Task.WhenAll(taskX, taskY);
|
|
|
|
return await taskX && await taskY;
|
|
}
|
|
|
|
public static Task<bool> RelRotateTo(this SkiaView view, double dRotation, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.Rotation), view.Rotation + dRotation, length, easing);
|
|
}
|
|
|
|
public static Task<bool> RelScaleTo(this SkiaView view, double dScale, uint length = 250, Easing? easing = null)
|
|
{
|
|
return AnimationManager.AnimateAsync(view, nameof(SkiaView.Scale), view.Scale + dScale, length, easing);
|
|
}
|
|
|
|
public static void CancelAnimations(this SkiaView view)
|
|
{
|
|
AnimationManager.CancelAnimations(view);
|
|
}
|
|
}
|