diff --git a/Directory.Build.props b/Directory.Build.props index 82972cd0..048df7d4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ Kirill Lyubimov - Kirill Lyubimov, rotorgames, martijn00 + Kirill Lyubimov, rotorgames, martijn00, Baseflow Xamarin.Forms, xamarin, forms, popup, page, modal https://github.com/rotorgames/Rg.Plugins.Popup/releases false @@ -18,7 +18,7 @@ https://github.com/rotorgames/Rg.Plugins.Popup git $(AssemblyName) ($(TargetFramework)) - 2.0.0.5 + 2.0.0.6 8.0 @@ -83,7 +83,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Rg.Plugins.Popup.sln b/Rg.Plugins.Popup.sln index d737cf6a..d2e178b0 100644 --- a/Rg.Plugins.Popup.sln +++ b/Rg.Plugins.Popup.sln @@ -449,7 +449,6 @@ Global {629564FB-8C63-40BD-BD06-FE2453BB461F}.Publish|x86.ActiveCfg = Debug|Any CPU {629564FB-8C63-40BD-BD06-FE2453BB461F}.Publish|x86.Build.0 = Debug|Any CPU {629564FB-8C63-40BD-BD06-FE2453BB461F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {629564FB-8C63-40BD-BD06-FE2453BB461F}.Release|Any CPU.Build.0 = Release|Any CPU {629564FB-8C63-40BD-BD06-FE2453BB461F}.Release|ARM.ActiveCfg = Release|Any CPU {629564FB-8C63-40BD-BD06-FE2453BB461F}.Release|ARM.Build.0 = Release|Any CPU {629564FB-8C63-40BD-BD06-FE2453BB461F}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -509,7 +508,6 @@ Global {0C21CF96-BEE6-4683-B061-14E69A4D2AB9}.Publish|x86.ActiveCfg = Release|Any CPU {0C21CF96-BEE6-4683-B061-14E69A4D2AB9}.Publish|x86.Build.0 = Release|Any CPU {0C21CF96-BEE6-4683-B061-14E69A4D2AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C21CF96-BEE6-4683-B061-14E69A4D2AB9}.Release|Any CPU.Build.0 = Release|Any CPU {0C21CF96-BEE6-4683-B061-14E69A4D2AB9}.Release|ARM.ActiveCfg = Release|Any CPU {0C21CF96-BEE6-4683-B061-14E69A4D2AB9}.Release|ARM.Build.0 = Release|Any CPU {0C21CF96-BEE6-4683-B061-14E69A4D2AB9}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -569,7 +567,6 @@ Global {AE8BE751-A884-410B-957C-7F5B643BDEF7}.Publish|x86.ActiveCfg = Release|Any CPU {AE8BE751-A884-410B-957C-7F5B643BDEF7}.Publish|x86.Build.0 = Release|Any CPU {AE8BE751-A884-410B-957C-7F5B643BDEF7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AE8BE751-A884-410B-957C-7F5B643BDEF7}.Release|Any CPU.Build.0 = Release|Any CPU {AE8BE751-A884-410B-957C-7F5B643BDEF7}.Release|ARM.ActiveCfg = Release|Any CPU {AE8BE751-A884-410B-957C-7F5B643BDEF7}.Release|ARM.Build.0 = Release|Any CPU {AE8BE751-A884-410B-957C-7F5B643BDEF7}.Release|iPhone.ActiveCfg = Release|Any CPU diff --git a/Rg.Plugins.Popup/Animations/Base/BaseAnimation.cs b/Rg.Plugins.Popup/Animations/Base/BaseAnimation.cs index 3806e8e4..4b5da883 100644 --- a/Rg.Plugins.Popup/Animations/Base/BaseAnimation.cs +++ b/Rg.Plugins.Popup/Animations/Base/BaseAnimation.cs @@ -10,10 +10,10 @@ public abstract class BaseAnimation : IPopupAnimation { private const uint DefaultDuration = 200; - [TypeConverter(typeof (UintTypeConverter))] + [TypeConverter(typeof(UintTypeConverter))] public uint DurationIn { get; set; } = DefaultDuration; - [TypeConverter(typeof (UintTypeConverter))] + [TypeConverter(typeof(UintTypeConverter))] public uint DurationOut { get; set; } = DefaultDuration; [TypeConverter(typeof(EasingTypeConverter))] diff --git a/Rg.Plugins.Popup/Animations/FadeAnimation.cs b/Rg.Plugins.Popup/Animations/FadeAnimation.cs index e95be199..76f82212 100644 --- a/Rg.Plugins.Popup/Animations/FadeAnimation.cs +++ b/Rg.Plugins.Popup/Animations/FadeAnimation.cs @@ -18,7 +18,7 @@ public override void Preparing(View content, PopupPage page) _defaultOpacity = page.Opacity; page.Opacity = 0; } - else if(content != null) + else if (content != null) { _defaultOpacity = content.Opacity; content.Opacity = 0; diff --git a/Rg.Plugins.Popup/Animations/MoveAnimation.cs b/Rg.Plugins.Popup/Animations/MoveAnimation.cs index af216966..35dcc6a0 100644 --- a/Rg.Plugins.Popup/Animations/MoveAnimation.cs +++ b/Rg.Plugins.Popup/Animations/MoveAnimation.cs @@ -15,7 +15,7 @@ public class MoveAnimation : FadeBackgroundAnimation public MoveAnimationOptions PositionIn { get; set; } public MoveAnimationOptions PositionOut { get; set; } - public MoveAnimation(): this(MoveAnimationOptions.Bottom, MoveAnimationOptions.Bottom) {} + public MoveAnimation() : this(MoveAnimationOptions.Bottom, MoveAnimationOptions.Bottom) { } public MoveAnimation(MoveAnimationOptions positionIn, MoveAnimationOptions positionOut) { @@ -33,7 +33,7 @@ public override void Preparing(View content, PopupPage page) HidePage(page); - if(content == null) return; + if (content == null) return; UpdateDefaultTranslations(content); } diff --git a/Rg.Plugins.Popup/Animations/ScaleAnimation.cs b/Rg.Plugins.Popup/Animations/ScaleAnimation.cs index 0cc5a211..cfa1cfdb 100644 --- a/Rg.Plugins.Popup/Animations/ScaleAnimation.cs +++ b/Rg.Plugins.Popup/Animations/ScaleAnimation.cs @@ -19,7 +19,7 @@ public class ScaleAnimation : FadeAnimation public MoveAnimationOptions PositionIn { get; set; } public MoveAnimationOptions PositionOut { get; set; } - public ScaleAnimation():this(MoveAnimationOptions.Center, MoveAnimationOptions.Center) {} + public ScaleAnimation() : this(MoveAnimationOptions.Center, MoveAnimationOptions.Center) { } public ScaleAnimation(MoveAnimationOptions positionIn, MoveAnimationOptions positionOut) { @@ -34,15 +34,15 @@ public ScaleAnimation(MoveAnimationOptions positionIn, MoveAnimationOptions posi public override void Preparing(View content, PopupPage page) { - if(HasBackgroundAnimation) base.Preparing(content, page); + if (HasBackgroundAnimation) base.Preparing(content, page); HidePage(page); - if(content == null) return; + if (content == null) return; UpdateDefaultProperties(content); - if(!HasBackgroundAnimation) content.Opacity = 0; + if (!HasBackgroundAnimation) content.Opacity = 0; } public override void Disposing(View content, PopupPage page) @@ -51,7 +51,7 @@ public override void Disposing(View content, PopupPage page) ShowPage(page); - if(content == null) return; + if (content == null) return; content.Scale = _defaultScale; content.Opacity = _defaultOpacity; @@ -138,7 +138,7 @@ public async override Task Disappearing(View content, PopupPage page) private Task Scale(View content, Easing easing, double start, double end, bool isAppearing) { TaskCompletionSource task = new TaskCompletionSource(); - + content.Animate("popIn", d => { content.Scale = d; diff --git a/Rg.Plugins.Popup/Converters/TypeConverters/UintTypeConverter.cs b/Rg.Plugins.Popup/Converters/TypeConverters/UintTypeConverter.cs index 4f31f079..d90e1a5c 100644 --- a/Rg.Plugins.Popup/Converters/TypeConverters/UintTypeConverter.cs +++ b/Rg.Plugins.Popup/Converters/TypeConverters/UintTypeConverter.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Xamarin.Forms; namespace Rg.Plugins.Popup.Converters.TypeConverters diff --git a/Rg.Plugins.Popup/Enums/MoveAnimationOptions.cs b/Rg.Plugins.Popup/Enums/MoveAnimationOptions.cs index 746729fc..66718ed9 100644 --- a/Rg.Plugins.Popup/Enums/MoveAnimationOptions.cs +++ b/Rg.Plugins.Popup/Enums/MoveAnimationOptions.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Rg.Plugins.Popup.Enums +namespace Rg.Plugins.Popup.Enums { public enum MoveAnimationOptions { diff --git a/Rg.Plugins.Popup/Extensions/VisualElementExtensions.cs b/Rg.Plugins.Popup/Extensions/VisualElementExtensions.cs index 2d8b94a5..aae1c9d1 100644 --- a/Rg.Plugins.Popup/Extensions/VisualElementExtensions.cs +++ b/Rg.Plugins.Popup/Extensions/VisualElementExtensions.cs @@ -7,7 +7,7 @@ namespace Rg.Plugins.Popup.Extensions { internal static class VisualElementExtensions { - [Obsolete("Use "+nameof(Element)+"."+nameof(Element.Descendants))] + [Obsolete("Use " + nameof(Element) + "." + nameof(Element.Descendants))] internal static IEnumerable RgDescendants(this Element element) { var queue = new Queue(16); diff --git a/Rg.Plugins.Popup/Pages/PopupPage.cs b/Rg.Plugins.Popup/Pages/PopupPage.cs index 6b0ce57b..ffd53ba7 100644 --- a/Rg.Plugins.Popup/Pages/PopupPage.cs +++ b/Rg.Plugins.Popup/Pages/PopupPage.cs @@ -12,12 +12,12 @@ public class PopupPage : ContentPage { #region Private - private const string IsAnimatingObsoleteText = - nameof(IsAnimating) + + private const string IsAnimatingObsoleteText = + nameof(IsAnimating) + " is obsolute as of v1.1.5. Please use " - +nameof(IsAnimationEnabled) + + + nameof(IsAnimationEnabled) + " instead. See more info: " - +Config.MigrationV1_0_xToV1_1_xUrl; + + Config.MigrationV1_0_xToV1_1_xUrl; #endregion @@ -161,7 +161,7 @@ protected override bool OnBackButtonPressed() protected override void LayoutChildren(double x, double y, double width, double height) { - if(HasSystemPadding) + if (HasSystemPadding) { var systemPadding = SystemPadding; var systemPaddingSide = SystemPaddingSides; @@ -188,7 +188,7 @@ protected override void LayoutChildren(double x, double y, double width, double else height -= top + bottom; } - else if(HasKeyboardOffset) + else if (HasKeyboardOffset) { height -= KeyboardOffset; } diff --git a/Rg.Plugins.Popup/Platforms/Android/Impl/PopupPlatformDroid.cs b/Rg.Plugins.Popup/Platforms/Android/Impl/PopupPlatformDroid.cs index 7b0828a1..124c12f7 100644 --- a/Rg.Plugins.Popup/Platforms/Android/Impl/PopupPlatformDroid.cs +++ b/Rg.Plugins.Popup/Platforms/Android/Impl/PopupPlatformDroid.cs @@ -56,7 +56,7 @@ public Task RemoveAsync(PopupPage page) DecoreView.RemoveView(renderer.View); renderer.Dispose(); - if(element != null) + if (element != null) element.Parent = null; return PostAsync(DecoreView); diff --git a/Rg.Plugins.Popup/Platforms/Android/Renderers/PopupPageRenderer.cs b/Rg.Plugins.Popup/Platforms/Android/Renderers/PopupPageRenderer.cs index 546e09cc..3e066fd4 100644 --- a/Rg.Plugins.Popup/Platforms/Android/Renderers/PopupPageRenderer.cs +++ b/Rg.Plugins.Popup/Platforms/Android/Renderers/PopupPageRenderer.cs @@ -2,6 +2,7 @@ using Android.App; using Android.Content; using Android.Graphics; +using Android.OS; using Android.Runtime; using Android.Views; using Android.Widget; @@ -12,7 +13,6 @@ using Xamarin.Forms.Platform.Android; using Point = Xamarin.Forms.Point; using View = Android.Views.View; -using Android.OS; [assembly: ExportRenderer(typeof(PopupPage), typeof(PopupPageRenderer))] namespace Rg.Plugins.Popup.Droid.Renderers @@ -26,11 +26,11 @@ public class PopupPageRenderer : PageRenderer private Point _downPosition; private bool _disposed; - private PopupPage CurrentElement => (PopupPage) Element; + private PopupPage CurrentElement => (PopupPage)Element; #region Main Methods - public PopupPageRenderer(Context context):base(context) + public PopupPageRenderer(Context context) : base(context) { _gestureDetectorListener = new RgGestureDetectorListener(); @@ -83,7 +83,7 @@ protected override void OnLayout(bool changed, int l, int t, int r, int b) { keyboardOffset = Context.FromPixels(screenRealSize.Y - visibleRect.Bottom); } - + systemPadding = new Thickness { Left = Context.FromPixels(windowInsets.SystemWindowInsetLeft), @@ -131,7 +131,7 @@ protected override void OnLayout(bool changed, int l, int t, int r, int b) protected override void OnAttachedToWindow() { - Context.HideKeyboard(((Activity) Context).Window.DecorView); + Context.HideKeyboard(((Activity)Context).Window.DecorView); base.OnAttachedToWindow(); } @@ -139,7 +139,7 @@ protected override void OnDetachedFromWindow() { Device.StartTimer(TimeSpan.FromMilliseconds(0), () => { - Popup.Context.HideKeyboard(((Activity) Popup.Context).Window.DecorView); + Popup.Context.HideKeyboard(((Activity)Popup.Context).Window.DecorView); return false; }); base.OnDetachedFromWindow(); @@ -207,7 +207,7 @@ public override bool OnTouchEvent(MotionEvent e) _gestureDetector.OnTouchEvent(e); - if(CurrentElement != null && CurrentElement.BackgroundInputTransparent) + if (CurrentElement != null && CurrentElement.BackgroundInputTransparent) { if (ChildCount > 0 && !IsInRegion(e.RawX, e.RawY, GetChildAt(0)) || ChildCount == 0) { diff --git a/Rg.Plugins.Popup/Platforms/Ios/Extensions/PlatformExtension.cs b/Rg.Plugins.Popup/Platforms/Ios/Extensions/PlatformExtension.cs index c7ca414d..7fb20293 100644 --- a/Rg.Plugins.Popup/Platforms/Ios/Extensions/PlatformExtension.cs +++ b/Rg.Plugins.Popup/Platforms/Ios/Extensions/PlatformExtension.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; +using System.Linq; using Rg.Plugins.Popup.IOS.Renderers; using UIKit; using Xamarin.Forms; diff --git a/Rg.Plugins.Popup/Platforms/Ios/Platform/PopupPlatformRenderer.cs b/Rg.Plugins.Popup/Platforms/Ios/Platform/PopupPlatformRenderer.cs index abf8a563..d964fbfc 100644 --- a/Rg.Plugins.Popup/Platforms/Ios/Platform/PopupPlatformRenderer.cs +++ b/Rg.Plugins.Popup/Platforms/Ios/Platform/PopupPlatformRenderer.cs @@ -1,7 +1,7 @@ -using UIKit; -using Xamarin.Forms.Platform.iOS; +using System; using Foundation; -using System; +using UIKit; +using Xamarin.Forms.Platform.iOS; namespace Rg.Plugins.Popup.IOS.Platform { @@ -94,7 +94,7 @@ public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientati public override void ViewDidLayoutSubviews() { base.ViewDidLayoutSubviews(); - + PresentedViewController?.ViewDidLayoutSubviews(); } } diff --git a/Rg.Plugins.Popup/Platforms/Ios/Platform/PopupWindow.cs b/Rg.Plugins.Popup/Platforms/Ios/Platform/PopupWindow.cs index 7ffb7a58..10167769 100644 --- a/Rg.Plugins.Popup/Platforms/Ios/Platform/PopupWindow.cs +++ b/Rg.Plugins.Popup/Platforms/Ios/Platform/PopupWindow.cs @@ -1,8 +1,8 @@ using System; using CoreGraphics; -using UIKit; -using Rg.Plugins.Popup.Pages; using Foundation; +using Rg.Plugins.Popup.Pages; +using UIKit; namespace Rg.Plugins.Popup.IOS.Platform { @@ -10,7 +10,7 @@ namespace Rg.Plugins.Popup.IOS.Platform [Register("RgPopupWindow")] internal class PopupWindow : UIWindow { - public PopupWindow(IntPtr handle):base(handle) + public PopupWindow(IntPtr handle) : base(handle) { // Fix #307 } @@ -22,7 +22,7 @@ public PopupWindow() public override UIView HitTest(CGPoint point, UIEvent uievent) { - var platformRenderer = (PopupPlatformRenderer) RootViewController; + var platformRenderer = (PopupPlatformRenderer)RootViewController; var formsElement = platformRenderer?.Renderer?.Element as PopupPage; var renderer = platformRenderer?.Renderer; var hitTestResult = base.HitTest(point, uievent); diff --git a/Rg.Plugins.Popup/Platforms/Ios/Renderers/PopupPageRenderer.cs b/Rg.Plugins.Popup/Platforms/Ios/Renderers/PopupPageRenderer.cs index c149ed3c..5b831a51 100644 --- a/Rg.Plugins.Popup/Platforms/Ios/Renderers/PopupPageRenderer.cs +++ b/Rg.Plugins.Popup/Platforms/Ios/Renderers/PopupPageRenderer.cs @@ -7,7 +7,6 @@ using UIKit; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; -using Size = Xamarin.Forms.Size; [assembly: ExportRenderer(typeof(PopupPage), typeof(PopupPageRenderer))] namespace Rg.Plugins.Popup.IOS.Renderers @@ -21,7 +20,7 @@ public class PopupPageRenderer : PageRenderer private bool _isDisposed; internal CGRect KeyboardBounds { get; private set; } = CGRect.Empty; - internal PopupPage CurrentElement => (PopupPage) Element; + internal PopupPage CurrentElement => (PopupPage)Element; #region Main Methods @@ -143,7 +142,7 @@ private async void KeyBoardDownNotification(NSNotification notifi) //It is needed that buttons are working when keyboard is opened. See #11 await Task.Delay(70); - if(!_isDisposed) + if (!_isDisposed) await UIView.AnimateAsync((double)(NSNumber)duration, OnKeyboardAnimated); } else diff --git a/Rg.Plugins.Popup/Platforms/Mac/Extensions/PlatformExtension.cs b/Rg.Plugins.Popup/Platforms/Mac/Extensions/PlatformExtension.cs index 85706b07..fa478f38 100644 --- a/Rg.Plugins.Popup/Platforms/Mac/Extensions/PlatformExtension.cs +++ b/Rg.Plugins.Popup/Platforms/Mac/Extensions/PlatformExtension.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; +using System.Linq; using AppKit; using Rg.Plugins.Popup.MacOS.Renderers; using Xamarin.Forms; diff --git a/Rg.Plugins.Popup/Platforms/Mac/Impl/PopupPlatformMacOS.cs b/Rg.Plugins.Popup/Platforms/Mac/Impl/PopupPlatformMacOS.cs index 7f0b8e0c..97c2c0d8 100644 --- a/Rg.Plugins.Popup/Platforms/Mac/Impl/PopupPlatformMacOS.cs +++ b/Rg.Plugins.Popup/Platforms/Mac/Impl/PopupPlatformMacOS.cs @@ -1,17 +1,12 @@ using System; -using System.Collections.Generic; using System.Threading.Tasks; using AppKit; -using CoreGraphics; using Foundation; using Rg.Plugins.Popup.Contracts; using Rg.Plugins.Popup.MacOS.Extensions; using Rg.Plugins.Popup.MacOS.Impl; -using Rg.Plugins.Popup.MacOS.Platform; using Rg.Plugins.Popup.Pages; using Xamarin.Forms; -using Xamarin.Forms.Platform.MacOS; -using XFPlatform = Xamarin.Forms.Platform.MacOS.Platform; [assembly: Dependency(typeof(PopupPlatformMacOS))] namespace Rg.Plugins.Popup.MacOS.Impl diff --git a/Rg.Plugins.Popup/Platforms/Mac/Platform/PopupPlatformRenderer.cs b/Rg.Plugins.Popup/Platforms/Mac/Platform/PopupPlatformRenderer.cs index 92e410ac..d1c17a46 100644 --- a/Rg.Plugins.Popup/Platforms/Mac/Platform/PopupPlatformRenderer.cs +++ b/Rg.Plugins.Popup/Platforms/Mac/Platform/PopupPlatformRenderer.cs @@ -1,7 +1,7 @@ -using Xamarin.Forms.Platform.MacOS; -using Foundation; -using System; +using System; using AppKit; +using Foundation; +using Xamarin.Forms.Platform.MacOS; namespace Rg.Plugins.Popup.MacOS.Platform { diff --git a/Rg.Plugins.Popup/Platforms/Mac/Platform/PopupWindow.cs b/Rg.Plugins.Popup/Platforms/Mac/Platform/PopupWindow.cs index 83310ca0..ace4c34f 100644 --- a/Rg.Plugins.Popup/Platforms/Mac/Platform/PopupWindow.cs +++ b/Rg.Plugins.Popup/Platforms/Mac/Platform/PopupWindow.cs @@ -1,8 +1,6 @@ using System; -using CoreGraphics; -using Rg.Plugins.Popup.Pages; -using Foundation; using AppKit; +using Foundation; namespace Rg.Plugins.Popup.MacOS.Platform { @@ -10,7 +8,7 @@ namespace Rg.Plugins.Popup.MacOS.Platform [Register("RgPopupWindow")] internal class PopupWindow : NSWindow { - public PopupWindow(IntPtr handle):base(handle) + public PopupWindow(IntPtr handle) : base(handle) { // Fix #307 } diff --git a/Rg.Plugins.Popup/Platforms/Mac/Renderers/PopupPageRenderer.cs b/Rg.Plugins.Popup/Platforms/Mac/Renderers/PopupPageRenderer.cs index 31c857e4..be08d2e2 100644 --- a/Rg.Plugins.Popup/Platforms/Mac/Renderers/PopupPageRenderer.cs +++ b/Rg.Plugins.Popup/Platforms/Mac/Renderers/PopupPageRenderer.cs @@ -1,13 +1,10 @@ -using System.Threading.Tasks; -using AppKit; -using CoreGraphics; +using AppKit; using Foundation; using Rg.Plugins.Popup.MacOS.Extensions; using Rg.Plugins.Popup.MacOS.Renderers; using Rg.Plugins.Popup.Pages; using Xamarin.Forms; using Xamarin.Forms.Platform.MacOS; -using Size = Xamarin.Forms.Size; [assembly: ExportRenderer(typeof(PopupPage), typeof(PopupPageRenderer))] namespace Rg.Plugins.Popup.MacOS.Renderers diff --git a/Rg.Plugins.Popup/Platforms/Tizen/Popup.cs b/Rg.Plugins.Popup/Platforms/Tizen/Popup.cs index c83f2d31..bca35357 100644 --- a/Rg.Plugins.Popup/Platforms/Tizen/Popup.cs +++ b/Rg.Plugins.Popup/Platforms/Tizen/Popup.cs @@ -1,6 +1,6 @@ +using System; using Rg.Plugins.Popup.Tizen.Impl; using Rg.Plugins.Popup.Tizen.Renderers; -using System; namespace Rg.Plugins.Popup.Tizen { diff --git a/Rg.Plugins.Popup/Platforms/Tizen/Renderers/PopupPageRenderer.cs b/Rg.Plugins.Popup/Platforms/Tizen/Renderers/PopupPageRenderer.cs index 7a67733e..523e2513 100644 --- a/Rg.Plugins.Popup/Platforms/Tizen/Renderers/PopupPageRenderer.cs +++ b/Rg.Plugins.Popup/Platforms/Tizen/Renderers/PopupPageRenderer.cs @@ -1,11 +1,11 @@ using System; -using Xamarin.Forms; -using Xamarin.Forms.Platform.Tizen; +using ElmSharp; using Rg.Plugins.Popup.Pages; using Rg.Plugins.Popup.Tizen.Renderers; -using ElmSharp; -using EPopup = ElmSharp.Popup; +using Xamarin.Forms; +using Xamarin.Forms.Platform.Tizen; using EColor = ElmSharp.Color; +using EPopup = ElmSharp.Popup; [assembly: ExportRenderer(typeof(PopupPage), typeof(PopupPageRenderer))] namespace Rg.Plugins.Popup.Tizen.Renderers @@ -51,7 +51,8 @@ protected override void OnElementChanged(ElementChangedEventArgs e) _gestureLayer = new GestureLayer(_popup); _gestureLayer.Attach(_popup); - _gestureLayer.SetTapCallback(GestureLayer.GestureType.Tap , GestureLayer.GestureState.End, (data) => { + _gestureLayer.SetTapCallback(GestureLayer.GestureType.Tap, GestureLayer.GestureState.End, (data) => + { if (ContentBound.HasValue) { var contentBound = ContentBound.Value; diff --git a/Rg.Plugins.Popup/Platforms/Uap/Impl/PopupPlatformWinPhone.cs b/Rg.Plugins.Popup/Platforms/Uap/Impl/PopupPlatformWinPhone.cs index 6c1e1dd1..272775cc 100644 --- a/Rg.Plugins.Popup/Platforms/Uap/Impl/PopupPlatformWinPhone.cs +++ b/Rg.Plugins.Popup/Platforms/Uap/Impl/PopupPlatformWinPhone.cs @@ -6,11 +6,11 @@ using Rg.Plugins.Popup.Services; using Rg.Plugins.Popup.Windows.Renderers; using Rg.Plugins.Popup.WinPhone.Impl; +using Windows.UI.Core; using Xamarin.Forms; using Xamarin.Forms.Internals; -using XPlatform = Xamarin.Forms.Platform.UWP.Platform; using Xamarin.Forms.Platform.UWP; -using Windows.UI.Core; +using XPlatform = Xamarin.Forms.Platform.UWP.Platform; [assembly: Dependency(typeof(PopupPlatformWinPhone))] namespace Rg.Plugins.Popup.WinPhone.Impl diff --git a/Rg.Plugins.Popup/Platforms/Uap/Popup.cs b/Rg.Plugins.Popup/Platforms/Uap/Popup.cs index d445f6a1..7fccb66d 100644 --- a/Rg.Plugins.Popup/Platforms/Uap/Popup.cs +++ b/Rg.Plugins.Popup/Platforms/Uap/Popup.cs @@ -28,7 +28,7 @@ public static IEnumerable GetExtraAssemblies(IEnumerable def GetAssembly() }; - if(defaultAssemblies != null) + if (defaultAssemblies != null) assemblies.AddRange(defaultAssemblies); return assemblies; @@ -36,7 +36,7 @@ public static IEnumerable GetExtraAssemblies(IEnumerable def private static Assembly GetAssembly() { - return typeof (T).GetTypeInfo().Assembly; + return typeof(T).GetTypeInfo().Assembly; } public static void Init() diff --git a/Rg.Plugins.Popup/Platforms/Uap/Renderers/PopupPageRenderer.cs b/Rg.Plugins.Popup/Platforms/Uap/Renderers/PopupPageRenderer.cs index 30325901..ccc51e6f 100644 --- a/Rg.Plugins.Popup/Platforms/Uap/Renderers/PopupPageRenderer.cs +++ b/Rg.Plugins.Popup/Platforms/Uap/Renderers/PopupPageRenderer.cs @@ -1,17 +1,16 @@ using System; -using System.Threading.Tasks; +using Rg.Plugins.Popup.Pages; +using Rg.Plugins.Popup.Windows.Renderers; using Windows.Foundation; using Windows.Graphics.Display; using Windows.UI.Core; using Windows.UI.ViewManagement; using Windows.UI.Xaml; using Windows.UI.Xaml.Input; -using Rg.Plugins.Popup.Pages; -using Rg.Plugins.Popup.Windows.Renderers; using Xamarin.Forms; using Xamarin.Forms.Internals; -using Size = Windows.Foundation.Size; using Xamarin.Forms.Platform.UWP; +using Size = Windows.Foundation.Size; using WinPopup = global::Windows.UI.Xaml.Controls.Primitives.Popup; [assembly: ExportRenderer(typeof(PopupPage), typeof(PopupPageRenderer))] diff --git a/Rg.Plugins.Popup/Platforms/Wpf/Impl/PopupPlatformWPF.cs b/Rg.Plugins.Popup/Platforms/Wpf/Impl/PopupPlatformWPF.cs index 90c6bf3c..bbb947b9 100644 --- a/Rg.Plugins.Popup/Platforms/Wpf/Impl/PopupPlatformWPF.cs +++ b/Rg.Plugins.Popup/Platforms/Wpf/Impl/PopupPlatformWPF.cs @@ -1,17 +1,17 @@ -using Rg.Plugins.Popup.Contracts; +using System; +using System.Threading.Tasks; +using Rg.Plugins.Popup.Contracts; using Rg.Plugins.Popup.Pages; +using Rg.Plugins.Popup.WPF.Extensions; using Rg.Plugins.Popup.WPF.Impl; using Rg.Plugins.Popup.WPF.Renderers; -using Rg.Plugins.Popup.WPF.Extensions; -using System; -using System.Threading.Tasks; using Xamarin.Forms; using Xamarin.Forms.Internals; using XPlatform = Xamarin.Forms.Platform.WPF.Platform; [assembly: Dependency(typeof(PopupPlatformWPF))] namespace Rg.Plugins.Popup.WPF.Impl -{ +{ [Preserve(AllMembers = true)] internal class PopupPlatformWPF : IPopupPlatform { @@ -24,7 +24,7 @@ public event EventHandler OnInitialized public bool IsInitialized => Popup.IsInitialized; public bool IsSystemAnimationEnabled => true; - + public Task AddAsync(PopupPage page) { page.Parent = Application.Current.MainPage; diff --git a/Rg.Plugins.Popup/Platforms/Wpf/Renderers/PopupPageRenderer.cs b/Rg.Plugins.Popup/Platforms/Wpf/Renderers/PopupPageRenderer.cs index 4368a6e3..0e00cb1e 100644 --- a/Rg.Plugins.Popup/Platforms/Wpf/Renderers/PopupPageRenderer.cs +++ b/Rg.Plugins.Popup/Platforms/Wpf/Renderers/PopupPageRenderer.cs @@ -1,12 +1,12 @@ -using Rg.Plugins.Popup.Pages; -using Rg.Plugins.Popup.WPF.Renderers; -using System; +using System; using System.Windows; +using Rg.Plugins.Popup.Pages; +using Rg.Plugins.Popup.WPF.Renderers; using Xamarin.Forms; using Xamarin.Forms.Internals; using Xamarin.Forms.Platform.WPF; -using WinPopup = System.Windows.Controls.Primitives.Popup; using Application = System.Windows.Application; +using WinPopup = System.Windows.Controls.Primitives.Popup; [assembly: ExportRenderer(typeof(PopupPage), typeof(PopupPageRenderer))] namespace Rg.Plugins.Popup.WPF.Renderers @@ -17,7 +17,7 @@ public class PopupPageRenderer : PageRenderer internal WinPopup Container { get; private set; } private PopupPage CurrentElement => (PopupPage)Element; - + internal void Prepare(WinPopup container) { Container = container; @@ -44,7 +44,7 @@ internal void Destroy() if (Application.Current.MainWindow != null) Application.Current.MainWindow.SizeChanged -= OnSizeChanged; } - + private void OnSizeChanged(object sender, SizeChangedEventArgs e) { UpdateElementSize(); diff --git a/Rg.Plugins.Popup/Rg.Plugins.Popup.csproj b/Rg.Plugins.Popup/Rg.Plugins.Popup.csproj index a5ddc851..97fd5176 100644 --- a/Rg.Plugins.Popup/Rg.Plugins.Popup.csproj +++ b/Rg.Plugins.Popup/Rg.Plugins.Popup.csproj @@ -43,7 +43,7 @@ - + @@ -112,7 +112,7 @@ - +