From 2091039fd18dffa96b92e4c3cc9f9dcf453f0e9c Mon Sep 17 00:00:00 2001 From: David Britch Date: Mon, 22 Jan 2024 17:13:08 +0000 Subject: [PATCH 1/3] Formating changes. --- .../CustomLayoutManagerFactory.cs | 22 +++++++------- .../Layouts/CustomGridLayoutManager.cs | 2 +- .../CustomLayoutDemos/MauiProgram.cs | 30 +++++++++---------- .../Views/CustomizedGridPage.xaml | 4 +-- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/CustomLayoutManagerFactory.cs b/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/CustomLayoutManagerFactory.cs index 33a79ebd2..ae8d4765a 100644 --- a/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/CustomLayoutManagerFactory.cs +++ b/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/CustomLayoutManagerFactory.cs @@ -3,16 +3,16 @@ namespace CustomLayoutDemos { - public class CustomLayoutManagerFactory : ILayoutManagerFactory - { - public ILayoutManager CreateLayoutManager(Layout layout) - { - if (layout is Grid) - { - return new CustomGridLayoutManager(layout as IGridLayout); - } - return null; - } - } + public class CustomLayoutManagerFactory : ILayoutManagerFactory + { + public ILayoutManager CreateLayoutManager(Layout layout) + { + if (layout is Grid) + { + return new CustomGridLayoutManager(layout as IGridLayout); + } + return null; + } + } } diff --git a/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/Layouts/CustomGridLayoutManager.cs b/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/Layouts/CustomGridLayoutManager.cs index 6b84c5c08..3234c3202 100644 --- a/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/Layouts/CustomGridLayoutManager.cs +++ b/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/Layouts/CustomGridLayoutManager.cs @@ -28,7 +28,7 @@ void EnsureRows() maxRow = Math.Max(grid.GetRow(child), maxRow); } - // Add more rows if we need them + // Add more rows if needed for (int n = grid.RowDefinitions.Count; n <= maxRow; n++) { grid.RowDefinitions.Add(new RowDefinition(GridLength.Star)); diff --git a/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/MauiProgram.cs b/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/MauiProgram.cs index 082ca1e75..fadc71ba3 100644 --- a/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/MauiProgram.cs +++ b/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/MauiProgram.cs @@ -4,25 +4,25 @@ namespace CustomLayoutDemos; public static class MauiProgram { - public static MauiApp CreateMauiApp() - { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .ConfigureFonts(fonts => - { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); - }); + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => + { + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); + }); - // Setup a custom layout manager so the default manager for the Grid can be replaced. - builder.Services.Add(new ServiceDescriptor(typeof(ILayoutManagerFactory), new CustomLayoutManagerFactory())); + // Setup a custom layout manager so the default manager for the Grid can be replaced. + builder.Services.Add(new ServiceDescriptor(typeof(ILayoutManagerFactory), new CustomLayoutManagerFactory())); #if DEBUG - builder.Logging.AddDebug(); + builder.Logging.AddDebug(); #endif - return builder.Build(); - } + return builder.Build(); + } } diff --git a/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/Views/CustomizedGridPage.xaml b/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/Views/CustomizedGridPage.xaml index eb6261be9..8646a7c5f 100644 --- a/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/Views/CustomizedGridPage.xaml +++ b/8.0/UserInterface/CustomLayoutDemos/CustomLayoutDemos/Views/CustomizedGridPage.xaml @@ -10,8 +10,8 @@