From 487f1492a8891328a6b5b29e0668ec969e7c07b7 Mon Sep 17 00:00:00 2001 From: "EU\\amosekr" Date: Tue, 26 Mar 2024 13:18:59 +0530 Subject: [PATCH] Unable do animation for popup page #339 --- DemoApp/DemoApp/Views/PopupSamples/SampleCustomPopup.xaml.cs | 3 +++ .../Controls/Popup/Animations/Base/BaseAnimation.cs | 2 +- .../Controls/Popup/Animations/Base/FadeBackgroundAnimation.cs | 2 +- .../Controls/Popup/Animations/MoveAnimation.cs | 2 +- .../Controls/Popup/Enums/MoveAnimationOptions.cs | 2 +- Trimble.Modus.Components/Controls/Popup/Pages/PopupPage.cs | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/DemoApp/DemoApp/Views/PopupSamples/SampleCustomPopup.xaml.cs b/DemoApp/DemoApp/Views/PopupSamples/SampleCustomPopup.xaml.cs index 60dfc8f8..4cc0ecc5 100644 --- a/DemoApp/DemoApp/Views/PopupSamples/SampleCustomPopup.xaml.cs +++ b/DemoApp/DemoApp/Views/PopupSamples/SampleCustomPopup.xaml.cs @@ -1,5 +1,7 @@ using DemoApp.ViewModels; using Trimble.Modus.Components; +using Trimble.Modus.Components.Popup.Animations; +using Trimble.Modus.Components.Popup.Enums; namespace DemoApp.Views.PopupSamples; @@ -10,5 +12,6 @@ public SampleCustomPopup() { InitializeComponent(); BindingContext = _viewModel; + Animation = new MoveAnimation() { PositionIn = MoveAnimationOptions.Left, PositionOut = MoveAnimationOptions.Left, DurationIn = 500, DurationOut = 500 }; } } diff --git a/Trimble.Modus.Components/Controls/Popup/Animations/Base/BaseAnimation.cs b/Trimble.Modus.Components/Controls/Popup/Animations/Base/BaseAnimation.cs index c94c5c84..1ccd1084 100644 --- a/Trimble.Modus.Components/Controls/Popup/Animations/Base/BaseAnimation.cs +++ b/Trimble.Modus.Components/Controls/Popup/Animations/Base/BaseAnimation.cs @@ -52,7 +52,7 @@ public interface IPopupAnimation Task Appearing(View content, PopupPage page); Task Disappearing(View content, PopupPage page); } -internal abstract class BaseAnimation : IPopupAnimation +public abstract class BaseAnimation : IPopupAnimation { private const uint DefaultDuration = 200; diff --git a/Trimble.Modus.Components/Controls/Popup/Animations/Base/FadeBackgroundAnimation.cs b/Trimble.Modus.Components/Controls/Popup/Animations/Base/FadeBackgroundAnimation.cs index 12c71e5d..8535c0bb 100644 --- a/Trimble.Modus.Components/Controls/Popup/Animations/Base/FadeBackgroundAnimation.cs +++ b/Trimble.Modus.Components/Controls/Popup/Animations/Base/FadeBackgroundAnimation.cs @@ -2,7 +2,7 @@ namespace Trimble.Modus.Components.Popup.Animations.Base; -internal abstract class FadeBackgroundAnimation : BaseAnimation +public abstract class FadeBackgroundAnimation : BaseAnimation { private Color? _backgroundColor; diff --git a/Trimble.Modus.Components/Controls/Popup/Animations/MoveAnimation.cs b/Trimble.Modus.Components/Controls/Popup/Animations/MoveAnimation.cs index 6f0702d5..1a276a3f 100644 --- a/Trimble.Modus.Components/Controls/Popup/Animations/MoveAnimation.cs +++ b/Trimble.Modus.Components/Controls/Popup/Animations/MoveAnimation.cs @@ -5,7 +5,7 @@ namespace Trimble.Modus.Components.Popup.Animations; -internal class MoveAnimation : FadeBackgroundAnimation +public class MoveAnimation : FadeBackgroundAnimation { private double _defaultTranslationX; private double _defaultTranslationY; diff --git a/Trimble.Modus.Components/Controls/Popup/Enums/MoveAnimationOptions.cs b/Trimble.Modus.Components/Controls/Popup/Enums/MoveAnimationOptions.cs index 11b4b244..3d585bf0 100644 --- a/Trimble.Modus.Components/Controls/Popup/Enums/MoveAnimationOptions.cs +++ b/Trimble.Modus.Components/Controls/Popup/Enums/MoveAnimationOptions.cs @@ -1,6 +1,6 @@ namespace Trimble.Modus.Components.Popup.Enums; -internal enum MoveAnimationOptions +public enum MoveAnimationOptions { Center, Left, diff --git a/Trimble.Modus.Components/Controls/Popup/Pages/PopupPage.cs b/Trimble.Modus.Components/Controls/Popup/Pages/PopupPage.cs index e2da6d75..93012f40 100644 --- a/Trimble.Modus.Components/Controls/Popup/Pages/PopupPage.cs +++ b/Trimble.Modus.Components/Controls/Popup/Pages/PopupPage.cs @@ -40,7 +40,7 @@ public bool HasSystemPadding public static readonly BindableProperty AnimationProperty = BindableProperty.Create(nameof(Animation), typeof(IPopupAnimation), typeof(PopupPage), new ScaleAnimation()); - internal IPopupAnimation Animation + public IPopupAnimation Animation { get => (IPopupAnimation)GetValue(AnimationProperty); set => SetValue(AnimationProperty, value);