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 20, 2024
1 parent 4e12cee commit 3507375
Show file tree
Hide file tree
Showing 226 changed files with 1,243 additions and 1,192 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace UITests
{
#if ANDROID
[TestFixture(TestDevice.Android)]
[TestFixture(TestDevice.Android)]
#elif IOSUITEST
[TestFixture(TestDevice.iOS)]
#elif MACUITEST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public UITestContextBase(TestDevice testDevice)
}

public static IUIClientContext? UITestContext { get { return UiTestContext; } }

protected AppiumDriver? Driver
{
get
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using NUnit.Framework;
using System.Drawing;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
using System.Drawing;

namespace UITests
{
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
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)
{
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 @@ -723,7 +723,7 @@ void UpdateBarBackground()
}
else
{
if(barBackgroundColor?.Alpha < 1f)
if (barBackgroundColor?.Alpha < 1f)
navigationBarAppearance.ConfigureWithTransparentBackground();
else
navigationBarAppearance.ConfigureWithOpaqueBackground();
Expand All @@ -744,7 +744,7 @@ void UpdateBarBackground()
}
else
{
if(barBackgroundColor?.Alpha == 0f)
if (barBackgroundColor?.Alpha == 0f)
{
NavigationBar.SetTransparentNavigationBar();
}
Expand Down Expand Up @@ -1205,7 +1205,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
2 changes: 1 addition & 1 deletion src/Controls/src/Core/Editor/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void IEditor.Completed()
{
(this as IEditorController).SendCompleted();
}

protected override Size ArrangeOverride(Rect bounds)
{
_previousBounds = bounds;
Expand Down
8 changes: 4 additions & 4 deletions src/Controls/src/Core/Element/Element.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ internal bool RemoveLogicalChild(Element element, int index)

internal Element ParentOverride
{
get
get
{
if (_parentOverride is null)
{
Expand Down Expand Up @@ -335,8 +335,8 @@ internal Element ParentOverride
WeakReference<Element> _realParent;
/// <summary>For internal use by .NET MAUI.</summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Element RealParent
{
public Element RealParent
{
get
{
if (_realParent is null)
Expand All @@ -356,7 +356,7 @@ public Element RealParent
}

return null;
}
}
private set
{
if (value is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public ItemContentView(Context context) : base(context)

AView PlatformView => Content?.ContainerView ?? Content?.PlatformView;

internal Func<Size?> RetrieveStaticSize
{
internal Func<Size?> RetrieveStaticSize
{
get => _retrieveStaticSize?.Target as Func<Size?>;
set => _retrieveStaticSize = new WeakReference(value);
}
Expand Down Expand Up @@ -115,7 +115,7 @@ protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)

// This means a different cell has already set our new size
// so let's just use that instead of perform our own speculative measure
if (possibleNewSize is not null &&
if (possibleNewSize is not null &&
_pixelSize is not null &&
!_pixelSize.Equals(possibleNewSize))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public partial class CarouselViewHandler : ItemsViewHandler<CarouselView>
ScrollViewer _scrollViewer;
WScrollBarVisibility? _horizontalScrollBarVisibilityWithoutLoop;
WScrollBarVisibility? _verticalScrollBarVisibilityWithoutLoop;
Size _currentSize;
Size _currentSize;
bool _isCarouselViewReady;
NotifyCollectionChangedEventHandler _collectionChanged;
readonly WeakNotifyCollectionChangedProxy _proxy = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static void MapPosition(CarouselViewHandler handler, CarouselView carouse
{
// If the initial position hasn't been set, we have a UpdateInitialPosition call on CarouselViewController
// that will handle this so we want to skip this mapper call. We need to wait for the CollectionView to be ready
if(handler.Controller is CarouselViewController carouselViewController && carouselViewController.InitialPositionSet)
if (handler.Controller is CarouselViewController carouselViewController && carouselViewController.InitialPositionSet)
{
carouselViewController.UpdateFromPosition();
}
Expand All @@ -71,7 +71,7 @@ public static void MapLoop(CarouselViewHandler handler, CarouselView carouselVie
(handler.Controller as CarouselViewController)?.UpdateLoop();
}

public override Size GetDesiredSize(double widthConstraint, double heightConstraint) =>
public override Size GetDesiredSize(double widthConstraint, double heightConstraint) =>
this.GetDesiredSizeFromHandler(widthConstraint, heightConstraint);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public StructuredItemsViewHandler(PropertyMapper mapper = null) : base(mapper ??
}

public static PropertyMapper<TItemsView, StructuredItemsViewHandler<TItemsView>> StructuredItemsViewMapper = new(ItemsViewMapper)
{
{
#if TIZEN
[StructuredItemsView.HeaderProperty.PropertyName] = MapHeader,
[StructuredItemsView.FooterProperty.PropertyName] = MapFooter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void TearDown(CarouselView carouselView)
DeviceDisplay.MainDisplayInfoChanged -= OnDisplayInfoChanged;

UnsubscribeCollectionItemsSourceChanged(ItemsSource);

_carouselViewLoopManager?.Dispose();
_carouselViewLoopManager = null;
InitialPositionSet = false;
Expand All @@ -230,9 +230,9 @@ void TearDown(CarouselView carouselView)
void Setup(CarouselView carouselView)
{
InitializeCarouselViewLoopManager();

_oldViews = new List<View>();

carouselView.Scrolled += CarouselViewScrolled;
DeviceDisplay.MainDisplayInfoChanged += OnDisplayInfoChanged;

Expand Down Expand Up @@ -560,7 +560,7 @@ void UpdateVisualStates()
}

// We aren't ready to update the visual states yet
if(_oldViews == null)
if (_oldViews == null)
{
return;
}
Expand Down
Loading

0 comments on commit 3507375

Please sign in to comment.