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 Nov 22, 2024
1 parent 5b5aaa5 commit 1e5cac8
Show file tree
Hide file tree
Showing 51 changed files with 255 additions and 241 deletions.
2 changes: 1 addition & 1 deletion src/Compatibility/Core/src/Tizen/ResourcePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static string GetPath(string res)
return res;
}

foreach (AppFW.ResourceManager.Category category in Enum.GetValues<AppFW.ResourceManager.Category>())
foreach (AppFW.ResourceManager.Category category in Enum.GetValues<AppFW.ResourceManager.Category>())
{
var path = AppFW.ResourceManager.TryGetPath(category, res);

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;
}
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/SetPropertiesVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ static bool TryParsePath(ILContext context, string path, TypeReference tSourceRe
{
if (previousPartTypeRef.IsArray)
previousPartTypeRef = previousPartTypeRef.GetElementType();

previousPartTypeRef.ResolveCached(context.Cache);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#nullable disable
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Graphics;

namespace Microsoft.Maui.Controls.Handlers.Compatibility
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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 Expand Up @@ -195,7 +195,7 @@ public static void MapPosition(CarouselViewHandler handler, CarouselView carouse
{
handler.UpdatePosition();
}

}

public static void MapIsBounceEnabled(CarouselViewHandler handler, CarouselView carouselView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ object FindBoundItem(ScrollToRequestEventArgs args)
{
// CollectionGroups property is of type IObservableVector, but these objects should implement ICollectionViewGroup
var itemGroup = CollectionViewSource.View.CollectionGroups[args.GroupIndex] as ICollectionViewGroup;
if (itemGroup != null &&
if (itemGroup != null &&
args.Index < itemGroup.GroupItems.Count)
{
return itemGroup.GroupItems[args.Index];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ public VisualElement? Element
if (_element == value)
return;

if (_element is View && ElementGestureRecognizers is {} gestureRecognizersBefore)
if (_element is View && ElementGestureRecognizers is { } gestureRecognizersBefore)
{
gestureRecognizersBefore.CollectionChanged -= _collectionChangedHandler;
}

_element = value;

if (_element is View && ElementGestureRecognizers is {} gestureRecognizersAfter)
if (_element is View && ElementGestureRecognizers is { } gestureRecognizersAfter)
{
gestureRecognizersAfter.CollectionChanged += _collectionChangedHandler;
}
Expand Down Expand Up @@ -385,7 +385,7 @@ protected virtual void Dispose(bool disposing)

ClearContainerEventHandlers();

if (_element is View && ElementGestureRecognizers is {} gestureRecognizers)
if (_element is View && ElementGestureRecognizers is { } gestureRecognizers)
{
gestureRecognizers.CollectionChanged -= _collectionChangedHandler;
}
Expand Down Expand Up @@ -425,7 +425,7 @@ void HandlePan(ManipulationDeltaRoutedEventArgs e, View view)
{
if (view == null)
return;

_isPanning = true;

foreach (IPanGestureController recognizer in view.GestureRecognizers.GetGesturesFor<PanGestureRecognizer>().Where(g => g.TouchPoints == _fingers.Count))
Expand Down Expand Up @@ -517,7 +517,7 @@ void OnPointerExited(object sender, PointerRoutedEventArgs e)
if (_fingers.Contains(id))
_fingers.Remove(id);
}

SwipeComplete(true);
PinchComplete(true);
}
Expand Down Expand Up @@ -756,7 +756,7 @@ void UpdateDragAndDropGestureRecognizers()
if (allowDrop)
{
_subscriptionFlags |= SubscriptionFlags.ContainerDropEventsSubscribed;

_container.AllowDrop = true;
_container.DragOver += HandleDragOver;
_container.Drop += HandleDrop;
Expand Down Expand Up @@ -784,7 +784,7 @@ void UpdatingGestureRecognizers()
{
_subscriptionFlags |= SubscriptionFlags.ContainerTapAndRightTabEventSubscribed;
_tappedEventHandler = new TappedEventHandler(OnTap);
_container.AddHandler(FrameworkElement.TappedEvent,_tappedEventHandler, true);
_container.AddHandler(FrameworkElement.TappedEvent, _tappedEventHandler, true);
_container.RightTapped += OnTap;
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ internal void Realize()
var content = dataTemplate.CreateContent();
_visualElement = content as VisualElement;

if(_visualElement is null)
if (_visualElement is null)
{
throw new InvalidOperationException($"{dataTemplate} could not be created from {content}");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ IEnumerator IEnumerable.GetEnumerator()
return ((IEnumerable)_internal).GetEnumerator();
}

void OnItemsVectorChanged(global::Windows.Foundation.Collections.IObservableVector<object> sender,
void OnItemsVectorChanged(global::Windows.Foundation.Collections.IObservableVector<object> sender,
global::Windows.Foundation.Collections.IVectorChangedEventArgs @event)
{
_vectorChanged.Invoke(sender, @event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ internal static void JumpToIndexAsync(ListViewBase list, int index, ScrollToPosi

public static async Task JumpToItemAsync(ListViewBase list, object targetItem, ScrollToPosition scrollToPosition)
{
if(!list.IsLoaded)
if (!list.IsLoaded)
{
list.OnLoaded(async () =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ internal static void SetLineBreakMode(this TextBlock textBlock, LineBreakMode li
throw new ArgumentOutOfRangeException();
}
}

internal static void SetTextReadingOrder(this TextBlock platformControl, bool detectReadingOrderFromContent) =>
platformControl.TextReadingOrder = detectReadingOrderFromContent
? TextReadingOrder.DetectFromContent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public async Task InnerCornerRadiusInitializesCorrectly(int cornerRadius)

var border = new Border()
{
Content = new Label
{
Text = "Background",
TextColor = Colors.Red,
FontFamily = "Segoe UI",
HorizontalOptions = LayoutOptions.Center,
Content = new Label
{
Text = "Background",
TextColor = Colors.Red,
FontFamily = "Segoe UI",
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center
},
HorizontalOptions = LayoutOptions.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Xunit;
using static Microsoft.Maui.DeviceTests.AssertHelpers;
using NavigationView = Microsoft.UI.Xaml.Controls.NavigationView;
using WFrameworkElement = Microsoft.UI.Xaml.FrameworkElement;
using WNavigationViewItem = Microsoft.UI.Xaml.Controls.NavigationViewItem;
using static Microsoft.Maui.DeviceTests.AssertHelpers;


namespace Microsoft.Maui.DeviceTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
using Microsoft.Maui.Platform;
using Microsoft.UI.Windowing;
using Xunit;
using WPanel = Microsoft.UI.Xaml.Controls.Panel;
using static Microsoft.Maui.DeviceTests.AssertHelpers;
using WPanel = Microsoft.UI.Xaml.Controls.Panel;

namespace Microsoft.Maui.DeviceTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public void OpenWindow(IWindow window)
throw new NotImplementedException();
}

public void ActivateWindow(IWindow window)
{
public void ActivateWindow(IWindow window)
{
throw new NotImplementedException();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[Issue(IssueTracker.Github, 23674, "Page.IsBusy activity indicators gets stuck/causes multiple to be displayed", PlatformAffected.Android)]
public class Issue23674 : NavigationPage
{
public Issue23674() : base(new Issue23674Page1()){ }
public Issue23674() : base(new Issue23674Page1()) { }

class Issue23674Page1 : ContentPage
{
Expand All @@ -16,7 +16,7 @@ public Issue23674Page1()
VerticalOptions = LayoutOptions.Start,
Text = "Navigate to page 1",
HeightRequest = 100,
Command = new Command(async ()=>
Command = new Command(async () =>
{
await Navigation.PushAsync(new Issue23674Page2());
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class MainPageCode : TabbedPage
{
public MainPageCode()
{
ToolbarItems.Add(new Microsoft.Maui.Controls.ToolbarItem() { Text = "add1" , AutomationId = "add1" });
ToolbarItems.Add(new Microsoft.Maui.Controls.ToolbarItem() { Text = "add1", AutomationId = "add1" });
ToolbarItems.Add(new Microsoft.Maui.Controls.ToolbarItem() { Text = $"{add2}", AutomationId = add2 });
ToolbarItems.Add(new Microsoft.Maui.Controls.ToolbarItem() { Text = $"{add3}", AutomationId = add3 });
ToolbarItems.Add(new Microsoft.Maui.Controls.ToolbarItem() { Text = "reload" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

namespace Microsoft.Maui.TestCases.Tests.Issues
{
public class Issue25192 : _IssuesUITest
{
public Issue25192(TestDevice testDevice) : base(testDevice)
{
}
public class Issue25192 : _IssuesUITest
{
public Issue25192(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "CarouselView Loop='False' renders incorrectly items";
public override string Issue => "CarouselView Loop='False' renders incorrectly items";

[Test]
[Category(UITestCategories.CarouselView)]
public void CarouselViewShouldRenderCorrectly()
{
App.WaitForElement("Item1");
VerifyScreenshot();
}
}
[Test]
[Category(UITestCategories.CarouselView)]
public void CarouselViewShouldRenderCorrectly()
{
App.WaitForElement("Item1");
VerifyScreenshot();
}
}
}
12 changes: 6 additions & 6 deletions src/Controls/tests/Xaml.UnitTests/Issues/Maui25819.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public void TearDown()
AppInfo.SetCurrent(null);
}


[Test]
public void DoesntThrow([Values]bool inflator)
public void DoesntThrow([Values] bool inflator)
{
MockCompiler.Compile(typeof(Maui25819));
var layout = new Maui25819(inflator);
layout.BindingContext = new Maui25819UserDataViewModel();
Assert.That(layout.label0.Text, Is.EqualTo("2023"));
Assert.That(layout.label0.Text, Is.EqualTo("2023"));
}
}
}
Expand Down Expand Up @@ -79,15 +79,15 @@ public Maui25819UserDataViewModel()

public class Maui25819UsersDataModel
{
public Maui25819InstalmentPlans InstalmentPlans { get; set; } = new();
public Maui25819InstalmentPlans InstalmentPlans { get; set; } = new();
}

public class Maui25819InstalmentPlans
{
public Maui25819InstalmentPlan[] InstalmentPlan { get; set; } = [];
public Maui25819InstalmentPlan[] InstalmentPlan { get; set; } = [];
}

public class Maui25819InstalmentPlan
{
public string FinancialYear { get; set; } = string.Empty;
public string FinancialYear { get; set; } = string.Empty;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static partial void MapCloseWindow(ApplicationHandler handler, IApplicati
(window.Handler?.PlatformView as Window)?.Close();
}
}

public static partial void MapActivateWindow(ApplicationHandler handler, IApplication application, object? args)
{
if (args is IWindow window)
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Handlers/Entry/EntryHandler.Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public partial class EntryHandler : ViewHandler<IEntry, TextBox>
protected override TextBox CreatePlatformView() =>
new MauiPasswordTextBox()
{
IsObfuscationDelayed = s_shouldBeDelayed
MauiPasswordTextBox.IsObfuscationDelayed = s_shouldBeDelayed
};

public override void SetVirtualView(IView view)
Expand Down Expand Up @@ -109,7 +109,7 @@ public static void MapSelectionLength(IEntryHandler handler, IEntry entry) =>
void OnPlatformTextChanged(object sender, TextChangedEventArgs args)
{
if (PlatformView is MauiPasswordTextBox passwordBox)
VirtualView?.UpdateText(passwordBox.Password);
VirtualView?.UpdateText(MauiPasswordTextBox.Password);
else
VirtualView?.UpdateText(PlatformView.Text);
}
Expand Down
Loading

0 comments on commit 1e5cac8

Please sign in to comment.