From 5abf7b07f1cf1ecb42774ac28b8d96a03f822a61 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 00:17:07 +0000 Subject: [PATCH] Automated dotnet-format update --- .../NavigationPageHandler.Android.cs | 17 ++++++++--------- .../NavigationPage/NavigationPageHandler.cs | 12 ++++++------ .../Platform/Android/NavHostPageFragment.cs | 4 ++-- .../iOS/ControlsNavigationController.cs | 12 ++++++------ src/Core/src/Handlers/Page/PageHandler.iOS.cs | 2 +- .../src/Platform/iOS/ContainerViewController.cs | 2 +- src/Core/src/Platform/iOS/LayoutView.cs | 2 +- 7 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Android.cs b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Android.cs index dc9f1cd96874..62092d59cbeb 100644 --- a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Android.cs +++ b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Android.cs @@ -9,13 +9,18 @@ using Android.Content.Res; using Android.Graphics; using Android.Graphics.Drawables; +using Android.OS; using Android.Runtime; using Android.Util; using Android.Views; using Android.Widget; using AndroidX.AppCompat.App; using AndroidX.AppCompat.Graphics.Drawable; +using AndroidX.AppCompat.Widget; using AndroidX.DrawerLayout.Widget; +using AndroidX.Lifecycle; +using AndroidX.Navigation; +using AndroidX.Navigation.Fragment; using Microsoft.Maui.Controls.Internals; using Microsoft.Maui.Controls.Platform; using Microsoft.Maui.Graphics; @@ -31,12 +36,6 @@ using FragmentTransaction = AndroidX.Fragment.App.FragmentTransaction; using Object = Java.Lang.Object; -using AndroidX.Navigation.Fragment; -using AndroidX.Navigation; -using Android.OS; -using AndroidX.AppCompat.Widget; -using AndroidX.Lifecycle; - namespace Microsoft.Maui.Controls.Handlers { public partial class NavigationPageHandler : @@ -60,7 +59,7 @@ protected override void ConnectHandler(AView nativeView) .GetFragmentManager() .FindFragmentById(Resource.Id.nav_host); - FragmentNavigator = + FragmentNavigator = (FragmentNavigator)NavHost .NavController .NavigatorProvider @@ -82,10 +81,10 @@ protected override void ConnectHandler(AView nativeView) var inflater = NavHost.NavController.NavInflater; NavGraph graph = new NavGraph(navGraphNavigator); System.Diagnostics.Debug.WriteLine($"RABBIT {graph.NavigatorName}"); - + NavDestination navDestination = null; List destinations = new List(); - foreach(var page in VirtualView.Navigation.NavigationStack) + foreach (var page in VirtualView.Navigation.NavigationStack) { navDestination = MauiFragmentNavDestination. diff --git a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.cs b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.cs index e8eb2a4b6942..93d063047947 100644 --- a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.cs +++ b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.cs @@ -14,12 +14,12 @@ public partial class NavigationPageHandler public static PropertyMapper NavigationPageMapper = new PropertyMapper(ViewHandler.ViewMapper) { - [NavigationPage.BarTextColorProperty.PropertyName] = MapTitleColor, - [NavigationPage.BarBackgroundColorProperty.PropertyName] = MapNavigationBarBackground, - [NavigationPage.BarBackgroundProperty.PropertyName] = MapNavigationBarBackground, - [nameof(IPadding.Padding)] = MapPadding, - [nameof(NavigationPage.TitleIconImageSourceProperty.PropertyName)] = MapTitleIcon, - [nameof(NavigationPage.TitleViewProperty.PropertyName)] = MapTitleView, + [NavigationPage.BarTextColorProperty.PropertyName] = MapTitleColor, + [NavigationPage.BarBackgroundColorProperty.PropertyName] = MapNavigationBarBackground, + [NavigationPage.BarBackgroundProperty.PropertyName] = MapNavigationBarBackground, + [nameof(IPadding.Padding)] = MapPadding, + [nameof(NavigationPage.TitleIconImageSourceProperty.PropertyName)] = MapTitleIcon, + [nameof(NavigationPage.TitleViewProperty.PropertyName)] = MapTitleView, #if WINDOWS [nameof(ToolbarPlacementProperty.PropertyName)] = MapToolbarPlacement, diff --git a/src/Controls/src/Core/Platform/Android/NavHostPageFragment.cs b/src/Controls/src/Core/Platform/Android/NavHostPageFragment.cs index c9b3e817c977..6edfe6bc84d0 100644 --- a/src/Controls/src/Core/Platform/Android/NavHostPageFragment.cs +++ b/src/Controls/src/Core/Platform/Android/NavHostPageFragment.cs @@ -21,7 +21,7 @@ class NavHostPageFragment : Fragment protected NavHostPageFragment(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) { - + } public NavHostPageFragment() @@ -61,7 +61,7 @@ class ProcessBackClick : AndroidX.Activity.OnBackPressedCallback { NavHostPageFragment _navHostPageFragment; - public ProcessBackClick(NavHostPageFragment navHostPageFragment) + public ProcessBackClick(NavHostPageFragment navHostPageFragment) : base(true) { _navHostPageFragment = navHostPageFragment; diff --git a/src/Controls/src/Core/Platform/iOS/ControlsNavigationController.cs b/src/Controls/src/Core/Platform/iOS/ControlsNavigationController.cs index 53c8b45fcd65..5a54be0b7bd6 100644 --- a/src/Controls/src/Core/Platform/iOS/ControlsNavigationController.cs +++ b/src/Controls/src/Core/Platform/iOS/ControlsNavigationController.cs @@ -1,14 +1,14 @@ //#nullable enable using System; -using UIKit; -using Microsoft.Maui.Controls.Handlers; -using Foundation; -using System.Threading.Tasks; -using ObjCRuntime; using System.Collections.Generic; -using Microsoft.Maui.Handlers; using System.Linq; +using System.Threading.Tasks; +using Foundation; +using Microsoft.Maui.Controls.Handlers; using Microsoft.Maui.Controls.Internals; +using Microsoft.Maui.Handlers; +using ObjCRuntime; +using UIKit; namespace Microsoft.Maui.Controls.Platform { diff --git a/src/Core/src/Handlers/Page/PageHandler.iOS.cs b/src/Core/src/Handlers/Page/PageHandler.iOS.cs index f7cd704ff39b..d8a15ec902b9 100644 --- a/src/Core/src/Handlers/Page/PageHandler.iOS.cs +++ b/src/Core/src/Handlers/Page/PageHandler.iOS.cs @@ -46,7 +46,7 @@ public override void SetVirtualView(IView view) public static void MapTitle(PageHandler handler, IPage page) { - if(handler._pageViewController != null) + if (handler._pageViewController != null) handler._pageViewController.Title = page.Title; } } diff --git a/src/Core/src/Platform/iOS/ContainerViewController.cs b/src/Core/src/Platform/iOS/ContainerViewController.cs index eb08014671ff..cf68db62dd4d 100644 --- a/src/Core/src/Platform/iOS/ContainerViewController.cs +++ b/src/Core/src/Platform/iOS/ContainerViewController.cs @@ -12,7 +12,7 @@ public IView? CurrentView set => SetView(value); } - public UIView? CurrentNativeView + public UIView? CurrentNativeView => _pendingLoadedView ?? currentNativeView; public IMauiContext? Context { get; set; } diff --git a/src/Core/src/Platform/iOS/LayoutView.cs b/src/Core/src/Platform/iOS/LayoutView.cs index de72af51474b..0c6dc2a1ff6a 100644 --- a/src/Core/src/Platform/iOS/LayoutView.cs +++ b/src/Core/src/Platform/iOS/LayoutView.cs @@ -60,7 +60,7 @@ public override void LayoutSubviews() public class PageViewController : ContainerViewController { - public PageViewController(IPage page,IMauiContext mauiContext) + public PageViewController(IPage page, IMauiContext mauiContext) { CurrentView = page; Context = mauiContext;