Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 27, 2024
1 parent 9d9288a commit 7c7aef6
Show file tree
Hide file tree
Showing 278 changed files with 1,565 additions and 1,490 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2143, "Picker on windows phone", PlatformAffected.WinPhone)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue2143 : ContentPage
{
public Issue2143()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 22246, "Entry in Grid nested in ViewCell isn't expanding", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue22246Bz : ContentPage
{
public Issue22246Bz()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2615, "iOS Cell Reuse screws up when cells are both ViewCell with different children", PlatformAffected.iOS)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue2615 : ContentPage
{
public Issue2615()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 5555, "Memory leak when SwitchCell or EntryCell", PlatformAffected.iOS)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue5555 : TestContentPage
{
[Preserve(AllMembers = true)]
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/Maps/src/HandlerImpl/Polygon.Impl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public IEnumerator<Location> GetEnumerator()
{
return Geopath.GetEnumerator();
}

/// <summary>
/// Gets the index of a specified location object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Android.Runtime;
using Android.Views;
using AndroidX.Navigation.Fragment;
using static Android.Views.ViewGroup.LayoutParams;
using Button = Android.Widget.Button;
using Fragment = AndroidX.Fragment.App.Fragment;
using View = Android.Views.View;
using static Android.Views.ViewGroup.LayoutParams;

namespace Maui.Controls.Sample.Droid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This is the main entry point of the application.
// If you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, typeof (AppDelegate));
UIApplication.Main(args, null, typeof(AppDelegate));
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private void AddNavBarButtons()
UIBarButtonSystemItem.Add,
(sender, e) => RequestSession("NewTaskWindow"));

NavigationItem.RightBarButtonItems = [ addNewTaskButton, addNewWindowButton ];
NavigationItem.RightBarButtonItems = [addNewTaskButton, addNewWindowButton];
}

private void RequestSession(string? activityType = null)
Expand Down Expand Up @@ -128,7 +128,7 @@ public ContainerView(UIView view)

public override void LayoutSubviews()
{
if (Subviews?.FirstOrDefault() is {} view)
if (Subviews?.FirstOrDefault() is { } view)
view.Frame = Bounds;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using Microsoft.UI.Xaml;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using Microsoft.UI.Xaml.Shapes;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
Expand All @@ -26,24 +26,24 @@ namespace Maui.Controls.Sample.WinUI;
/// </summary>
public partial class App : Microsoft.UI.Xaml.Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
InitializeComponent();
}
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
InitializeComponent();
}

/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
m_window = new MainWindow();
m_window.Activate();
}
/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
m_window = new MainWindow();
m_window.Activate();
}

private Microsoft.UI.Xaml.Window? m_window;
private Microsoft.UI.Xaml.Window? m_window;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This is the main entry point of the application.
// If you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, typeof (AppDelegate));
UIApplication.Main(args, null, typeof(AppDelegate));
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public ContainerView(UIView view)

public override void LayoutSubviews()
{
if (Subviews?.FirstOrDefault() is {} view)
if (Subviews?.FirstOrDefault() is { } view)
view.Frame = Bounds;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,33 @@ public static MauiAppBuilder UseMauiEmbeddedApp<TApp>(this MauiAppBuilder builde
{
typeof(DynamicResourceExtension).Assembly // Controls.Xaml
.GetType("Microsoft.Maui.Controls.Embedding.EmbeddingExtensions")!
.GetMethod("UseMauiEmbeddedApp", 1, [ typeof(MauiAppBuilder) ])!
.GetMethod("UseMauiEmbeddedApp", 1, [typeof(MauiAppBuilder)])!
.MakeGenericMethod(typeof(TApp))
.Invoke(null, [ builder ]);
.Invoke(null, [builder]);
return builder;
}

public static IMauiContext CreateEmbeddedWindowContext(this MauiApp mauiApp, PlatformWindow platformWindow)
{
return (IMauiContext)typeof(Application).Assembly // Controls.Core
.GetType("Microsoft.Maui.Controls.Embedding.EmbeddingExtensions")!
.GetMethod("CreateEmbeddedWindowContext", [ typeof(MauiApp), typeof(PlatformWindow) ])!
.Invoke(null, [ mauiApp, platformWindow ])!;
.GetMethod("CreateEmbeddedWindowContext", [typeof(MauiApp), typeof(PlatformWindow)])!
.Invoke(null, [mauiApp, platformWindow])!;
}

public static PlatformView ToPlatformEmbedded(this IElement element, IMauiContext context)
{
return (PlatformView)typeof(Application).Assembly // Controls.Core
.GetType("Microsoft.Maui.Controls.Embedding.EmbeddingExtensions")!
.GetMethod("ToPlatformEmbedded", [ typeof(IElement), typeof(IMauiContext) ])!
.Invoke(null, [ element, context ])!;
.GetMethod("ToPlatformEmbedded", [typeof(IElement), typeof(IMauiContext)])!
.Invoke(null, [element, context])!;
}

public static PlatformView ToPlatformEmbedded(this IElement element, MauiApp mauiApp, PlatformWindow platformWindow)
{
return (PlatformView)typeof(Application).Assembly // Controls.Core
.GetType("Microsoft.Maui.Controls.Embedding.EmbeddingExtensions")!
.GetMethod("ToPlatformEmbedded", [ typeof(IElement), typeof(MauiApp), typeof(PlatformWindow) ])!
.Invoke(null, [ element, mauiApp, platformWindow ])!;
.GetMethod("ToPlatformEmbedded", [typeof(IElement), typeof(MauiApp), typeof(PlatformWindow)])!
.Invoke(null, [element, mauiApp, platformWindow])!;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void OnToggleFlyoutIsPresented(object sender, EventArgs e)
{
AppShell!.FlyoutIsPresented = !AppShell!.FlyoutIsPresented;
}

void OnToggleFlyoutBackgroundColor(object sender, EventArgs e)
{
AppShell!.RemoveBinding(Shell.FlyoutBackgroundProperty);
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/CreateObjectVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void Visit(ElementNode node, INode parentNode)
foreach (var n in en.CollectionItems)
n.Accept(visitor, cnode);
}

var il = new ArrayExtension().ProvideValue(node, Module, Context, out typeref);
var vardef = new VariableDefinition(typeref);
Context.Variables[node] = vardef;
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Core/AppThemeBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void OnAppThemeChanged()
{
Binding.Apply(false);
}

public AppThemeBinding Binding { get; }

public void Unsubscribe()
Expand Down
7 changes: 4 additions & 3 deletions src/Controls/src/Core/BindableLayout/BindableLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,9 @@ void ClearChildren(IBindableLayout layout)

// Empty view inherits the BindingContext automatically,
// we don't want to mess up with automatic inheritance.
if (child == _currentEmptyView) continue;

if (child == _currentEmptyView)
continue;

// Given that we've set BindingContext manually on children we have to clear it on removal.
child.BindingContext = null;
}
Expand Down Expand Up @@ -410,7 +411,7 @@ void ItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArg
{
var child = (View)layout.Children[index]!;
layout.RemoveAt(index);

// It's our responsibility to clear the BindingContext for the children
// Given that we've set them manually in CreateItemView
child.BindingContext = null;
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Core/BindableProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public sealed class BindableProperty
public string PropertyName { get; }

/// <include file="../../docs/Microsoft.Maui.Controls/BindableProperty.xml" path="//Member[@MemberName='ReturnType']/Docs/*" />
[DynamicallyAccessedMembers(ReturnTypeMembers)]
[DynamicallyAccessedMembers(ReturnTypeMembers)]
public Type ReturnType { get; }

internal BindablePropertyBindingChanging BindingChanging { get; private set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public override void UpdateValue(string property)
base.UpdateValue(property);
var args = new PropertyChangedEventArgs(property);
if (VirtualView is BindableObject bindableObject &&
GetRealCell(bindableObject) is CellTableViewCell ctv )
GetRealCell(bindableObject) is CellTableViewCell ctv)
{
ctv.HandlePropertyChanged(bindableObject, args);
}
Expand All @@ -171,7 +171,7 @@ public override void Invoke(string command, object? args)
{
base.Invoke(command, args);

if (command == "ForceUpdateSizeRequested" &&
if (command == "ForceUpdateSizeRequested" &&
VirtualView is BindableObject bindableObject &&
GetRealCell(bindableObject) is UITableViewCell ctv &&
_tableView is not null &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;
using Microsoft.Maui.Devices;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Platform;
using ObjCRuntime;
using UIKit;
using static Microsoft.Maui.Controls.Compatibility.Platform.iOS.AccessibilityExtensions;
Expand All @@ -21,7 +22,6 @@
using PointF = CoreGraphics.CGPoint;
using RectangleF = CoreGraphics.CGRect;
using SizeF = CoreGraphics.CGSize;
using Microsoft.Maui.Platform;

namespace Microsoft.Maui.Controls.Handlers.Compatibility
{
Expand Down Expand Up @@ -729,7 +729,7 @@ void UpdateBarBackground()
}
else
{
if(barBackgroundColor?.Alpha < 1f)
if (barBackgroundColor?.Alpha < 1f)
navigationBarAppearance.ConfigureWithTransparentBackground();
else
navigationBarAppearance.ConfigureWithOpaqueBackground();
Expand All @@ -750,7 +750,7 @@ void UpdateBarBackground()
}
else
{
if(barBackgroundColor?.Alpha == 0f)
if (barBackgroundColor?.Alpha == 0f)
{
NavigationBar.SetTransparentNavigationBar();
}
Expand Down Expand Up @@ -1211,7 +1211,7 @@ public void UpdateFrames()
!n._disposed &&
!n._navigating
)
{
{
var vc = ChildViewControllers[^1];

if (vc is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ bool UpdateContentPadding()
// If you try to use Margin the RecylcerView won't render anything.
if (flyoutView is AndroidX.Core.View.IScrollingView &&
flyoutView is ViewGroup vg)
{
{
if (vg.PaddingBottom != bottomOffset)
{
vg.SetPadding(0, 0, 0, bottomOffset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void UpdateNavigationBarAppearance(UINavigationController controller, ShellAppea
else
{
if (background != null)
navBar.BarTintColor = background.ToPlatform();
navBar.BarTintColor = background.ToPlatform();
if (foreground != null)
navBar.TintColor = foreground.ToPlatform();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public override UIKit.UIStatusBarAnimation PreferredStatusBarUpdateAnimation
};
}
}


#region IShellContext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
// https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/widget/ListView.java;l=1314-1322?q=ListView
// This causes issues because if a TextCell already has a view that's attached to the visual tree, then `OnMeasure(AT_MOST)`
// will call "GetView" without a convert view. Android basically creates an in memory copy of the table to calculate the measure.
//
//
// Our problem is that we don't have a way of knowing if a view we are returning from getView will be the one we
// should track against our TextCellHandler or not.
// This all worked fine in XF because in XF we didn't really block against just creating as many renderers against a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public PrimaryToolbarItem(ToolbarItem item, bool forceName)
this.SetAccessibilityLabel(item);
}

void OnClicked (object sender, EventArgs e)
void OnClicked(object sender, EventArgs e)
{
if (_item.TryGetTarget(out var item))
{
Expand Down Expand Up @@ -148,7 +148,7 @@ public SecondaryToolbarItem(ToolbarItem item) : base(new SecondaryToolbarItemCon
this.SetAccessibilityLabel(item);
}

void OnClicked (object sender, EventArgs e)
void OnClicked(object sender, EventArgs e)
{
if (_item.TryGetTarget(out var item))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ page.Handler is IPlatformViewHandler pvh &&
IDisposable? SetupHideSoftInputOnTapped(AView aView)
{
if (aView is AViewGroup vg &&
vg.GetFirstChildOfType<EditText>() is {} editText)
vg.GetFirstChildOfType<EditText>() is { } editText)
{
aView = editText;
}
Expand Down
Loading

0 comments on commit 7c7aef6

Please sign in to comment.