From 295594bf967b7581f551881218d036120fd381b9 Mon Sep 17 00:00:00 2001 From: Samantha Houts Date: Thu, 20 Oct 2022 02:46:57 -0700 Subject: [PATCH] Fix typos in code (#10795) --- .../src/Core/GalleryPages/MacOSTestGallery.cs | 2 +- .../src/UITests.Shared/Tests/CarouselViewUITests.cs | 12 ++++++------ src/Core/src/Graphics/PaintExtensions.Android.cs | 4 ++-- src/Core/src/Graphics/PaintExtensions.Tizen.cs | 4 ++-- .../src/Handlers/Editor/EditorHandler.Android.cs | 6 +++--- .../src/Handlers/Editor/EditorHandler.Windows.cs | 6 +++--- src/Core/src/Handlers/Editor/EditorHandler.iOS.cs | 6 +++--- src/Core/src/Handlers/Entry/EntryHandler.Android.cs | 6 +++--- src/Core/src/Handlers/Entry/EntryHandler.Windows.cs | 6 +++--- src/Core/src/Handlers/Entry/EntryHandler.iOS.cs | 6 +++--- .../Handlers/FlyoutView/FlyoutViewHandler.Windows.cs | 6 +++--- src/Core/src/Platform/Tizen/ViewExtensions.cs | 4 ++-- 12 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/Compatibility/ControlGallery/src/Core/GalleryPages/MacOSTestGallery.cs b/src/Compatibility/ControlGallery/src/Core/GalleryPages/MacOSTestGallery.cs index bac5d3324a62..e61f26c2fba3 100644 --- a/src/Compatibility/ControlGallery/src/Core/GalleryPages/MacOSTestGallery.cs +++ b/src/Compatibility/ControlGallery/src/Core/GalleryPages/MacOSTestGallery.cs @@ -136,7 +136,7 @@ public MacOSTestGallery() scroller.Scrolled += (sender, e) => { - lbl.Text = $"Current postion {scroller.ScrollY}"; + lbl.Text = $"Current Position {scroller.ScrollY}"; }; scroller.Content = mainStck; diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/CarouselViewUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/CarouselViewUITests.cs index 17dd2c3aa0c9..37ba1b0487be 100644 --- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/CarouselViewUITests.cs +++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/CarouselViewUITests.cs @@ -331,25 +331,25 @@ public void CarouselViewObservableCollection(string subgallery) { App.WaitForElement("lblPosition"); - string GetPostion() + string GetPosition() { return App.Query(c => c.Marked("lblPosition")).First().Text; } - Assert.AreEqual("0", GetPostion()); + Assert.AreEqual("0", GetPosition()); App.Tap("btnNewObservable"); - Assert.AreEqual("0", GetPostion()); + Assert.AreEqual("0", GetPosition()); SwipeRightToLeft(); App.Tap("btnAddObservable"); - Assert.AreEqual("0", GetPostion()); + Assert.AreEqual("0", GetPosition()); SwipeRightToLeft(); - Assert.AreEqual("1", GetPostion()); + Assert.AreEqual("1", GetPosition()); SwipeRightToLeft(); - Assert.AreEqual("2", GetPostion()); + Assert.AreEqual("2", GetPosition()); } finally { diff --git a/src/Core/src/Graphics/PaintExtensions.Android.cs b/src/Core/src/Graphics/PaintExtensions.Android.cs index 9ab448ee4d9f..6d25511aa2b2 100644 --- a/src/Core/src/Graphics/PaintExtensions.Android.cs +++ b/src/Core/src/Graphics/PaintExtensions.Android.cs @@ -71,8 +71,8 @@ public static partial class PaintExtensions return drawable; } - static bool IsValid(this GradientPaint? gradienPaint) => - gradienPaint?.GradientStops?.Length > 0; + static bool IsValid(this GradientPaint? gradientPaint) => + gradientPaint?.GradientStops?.Length > 0; internal static GradientData GetGradientPaintData(GradientPaint gradientPaint, float alpha = 1.0f) { diff --git a/src/Core/src/Graphics/PaintExtensions.Tizen.cs b/src/Core/src/Graphics/PaintExtensions.Tizen.cs index f683d214fe84..8acddc010b34 100644 --- a/src/Core/src/Graphics/PaintExtensions.Tizen.cs +++ b/src/Core/src/Graphics/PaintExtensions.Tizen.cs @@ -76,7 +76,7 @@ public static TColor ToPlatform(this Paint paint) }; } - static bool IsValid(this GradientPaint? gradienPaint) => - gradienPaint?.GradientStops?.Length > 0; + static bool IsValid(this GradientPaint? gradientPaint) => + gradientPaint?.GradientStops?.Length > 0; } } \ No newline at end of file diff --git a/src/Core/src/Handlers/Editor/EditorHandler.Android.cs b/src/Core/src/Handlers/Editor/EditorHandler.Android.cs index d2baf62178d1..f33450c4389a 100644 --- a/src/Core/src/Handlers/Editor/EditorHandler.Android.cs +++ b/src/Core/src/Handlers/Editor/EditorHandler.Android.cs @@ -122,11 +122,11 @@ void OnTextChanged(object? sender, Android.Text.TextChangedEventArgs e) => private void OnSelectionChanged(object? sender, EventArgs e) { - var cursorPostion = PlatformView.GetCursorPosition(); + var cursorPosition = PlatformView.GetCursorPosition(); var selectedTextLength = PlatformView.GetSelectedTextLength(); - if (VirtualView.CursorPosition != cursorPostion) - VirtualView.CursorPosition = cursorPostion; + if (VirtualView.CursorPosition != cursorPosition) + VirtualView.CursorPosition = cursorPosition; if (VirtualView.SelectionLength != selectedTextLength) VirtualView.SelectionLength = selectedTextLength; diff --git a/src/Core/src/Handlers/Editor/EditorHandler.Windows.cs b/src/Core/src/Handlers/Editor/EditorHandler.Windows.cs index 59eac5bd253e..38019a654b84 100644 --- a/src/Core/src/Handlers/Editor/EditorHandler.Windows.cs +++ b/src/Core/src/Handlers/Editor/EditorHandler.Windows.cs @@ -101,11 +101,11 @@ void OnPlatformLoaded(object sender, RoutedEventArgs e) => private void OnSelectionChanged(object sender, RoutedEventArgs e) { - var cursorPostion = PlatformView.GetCursorPosition(); + var cursorPosition = PlatformView.GetCursorPosition(); var selectedTextLength = PlatformView.SelectionLength; - if (VirtualView.CursorPosition != cursorPostion) - VirtualView.CursorPosition = cursorPostion; + if (VirtualView.CursorPosition != cursorPosition) + VirtualView.CursorPosition = cursorPosition; if (VirtualView.SelectionLength != selectedTextLength) VirtualView.SelectionLength = selectedTextLength; diff --git a/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs b/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs index fc8450aecfa9..ade8b6ce3084 100644 --- a/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs +++ b/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs @@ -173,11 +173,11 @@ void OnTextPropertySet(object? sender, EventArgs e) => private void OnSelectionChanged(object? sender, EventArgs e) { - var cursorPostion = PlatformView.GetCursorPosition(); + var cursorPosition = PlatformView.GetCursorPosition(); var selectedTextLength = PlatformView.GetSelectedTextLength(); - if (VirtualView.CursorPosition != cursorPostion) - VirtualView.CursorPosition = cursorPostion; + if (VirtualView.CursorPosition != cursorPosition) + VirtualView.CursorPosition = cursorPosition; if (VirtualView.SelectionLength != selectedTextLength) VirtualView.SelectionLength = selectedTextLength; diff --git a/src/Core/src/Handlers/Entry/EntryHandler.Android.cs b/src/Core/src/Handlers/Entry/EntryHandler.Android.cs index 32a82b6b5ec4..e0a1261cf187 100644 --- a/src/Core/src/Handlers/Entry/EntryHandler.Android.cs +++ b/src/Core/src/Handlers/Entry/EntryHandler.Android.cs @@ -174,11 +174,11 @@ void OnEditorAction(object? sender, EditorActionEventArgs e) private void OnSelectionChanged(object? sender, EventArgs e) { - var cursorPostion = PlatformView.GetCursorPosition(); + var cursorPosition = PlatformView.GetCursorPosition(); var selectedTextLength = PlatformView.GetSelectedTextLength(); - if (VirtualView.CursorPosition != cursorPostion) - VirtualView.CursorPosition = cursorPostion; + if (VirtualView.CursorPosition != cursorPosition) + VirtualView.CursorPosition = cursorPosition; if (VirtualView.SelectionLength != selectedTextLength) VirtualView.SelectionLength = selectedTextLength; diff --git a/src/Core/src/Handlers/Entry/EntryHandler.Windows.cs b/src/Core/src/Handlers/Entry/EntryHandler.Windows.cs index 7d8998da19b5..2b2dfdafe54f 100644 --- a/src/Core/src/Handlers/Entry/EntryHandler.Windows.cs +++ b/src/Core/src/Handlers/Entry/EntryHandler.Windows.cs @@ -130,11 +130,11 @@ void OnPlatformKeyUp(object? sender, KeyRoutedEventArgs args) void OnPlatformSelectionChanged(object sender, RoutedEventArgs e) { - var cursorPostion = PlatformView.GetCursorPosition(); + var cursorPosition = PlatformView.GetCursorPosition(); var selectedTextLength = PlatformView.SelectionLength; - if (VirtualView.CursorPosition != cursorPostion) - VirtualView.CursorPosition = cursorPostion; + if (VirtualView.CursorPosition != cursorPosition) + VirtualView.CursorPosition = cursorPosition; if (VirtualView.SelectionLength != selectedTextLength) VirtualView.SelectionLength = selectedTextLength; diff --git a/src/Core/src/Handlers/Entry/EntryHandler.iOS.cs b/src/Core/src/Handlers/Entry/EntryHandler.iOS.cs index 6d531b9f60ab..5380d17d193f 100644 --- a/src/Core/src/Handlers/Entry/EntryHandler.iOS.cs +++ b/src/Core/src/Handlers/Entry/EntryHandler.iOS.cs @@ -161,11 +161,11 @@ bool OnShouldChangeCharacters(UITextField textField, NSRange range, string repla private void OnSelectionChanged(object? sender, EventArgs e) { - var cursorPostion = PlatformView.GetCursorPosition(); + var cursorPosition = PlatformView.GetCursorPosition(); var selectedTextLength = PlatformView.GetSelectedTextLength(); - if (VirtualView.CursorPosition != cursorPostion) - VirtualView.CursorPosition = cursorPostion; + if (VirtualView.CursorPosition != cursorPosition) + VirtualView.CursorPosition = cursorPosition; if (VirtualView.SelectionLength != selectedTextLength) VirtualView.SelectionLength = selectedTextLength; diff --git a/src/Core/src/Handlers/FlyoutView/FlyoutViewHandler.Windows.cs b/src/Core/src/Handlers/FlyoutView/FlyoutViewHandler.Windows.cs index e272cd184bfd..bd5f2499cb5d 100644 --- a/src/Core/src/Handlers/FlyoutView/FlyoutViewHandler.Windows.cs +++ b/src/Core/src/Handlers/FlyoutView/FlyoutViewHandler.Windows.cs @@ -19,15 +19,15 @@ protected override RootNavigationView CreatePlatformView() protected override void ConnectHandler(RootNavigationView platformView) { _navigationRootManager = MauiContext?.GetNavigationRootManager(); - platformView.PaneOpened += OnPaneOepened; + platformView.PaneOpened += OnPaneOpened; } protected override void DisconnectHandler(RootNavigationView platformView) { - platformView.PaneOpened -= OnPaneOepened; + platformView.PaneOpened -= OnPaneOpened; } - void OnPaneOepened(NavigationView sender, object args) + void OnPaneOpened(NavigationView sender, object args) { VirtualView.IsPresented = sender.IsPaneOpen; } diff --git a/src/Core/src/Platform/Tizen/ViewExtensions.cs b/src/Core/src/Platform/Tizen/ViewExtensions.cs index 157bd9bf7c97..3035eb0f81ff 100644 --- a/src/Core/src/Platform/Tizen/ViewExtensions.cs +++ b/src/Core/src/Platform/Tizen/ViewExtensions.cs @@ -251,8 +251,8 @@ internal static Rect GetPlatformViewBounds(this NView platformView) { if (platformView == null) return new Rect(); - var screenPostion = platformView.ScreenPosition; - return new TRect(screenPostion.X, screenPostion.Y, platformView.SizeWidth, platformView.SizeHeight).ToDP(); + var screenPosition = platformView.ScreenPosition; + return new TRect(screenPosition.X, screenPosition.Y, platformView.SizeWidth, platformView.SizeHeight).ToDP(); } internal static Matrix4x4 GetViewTransform(this IView view)