diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 7bb5d492f49b..7ce8893aba83 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -42,11 +42,14 @@ body: label: Version with bug description: In what version do you see this issue? Run `dotnet workload list` to find your version. options: + - 10.0.0-preview.6 - 10.0.0-preview.5 - 10.0.0-preview.4 - 10.0.0-preview.3 - 10.0.0-preview.2 - 10.0.0-preview.1 + - 9.0.90 SR9 + - 9.0.82 SR8.2 - 9.0.81 SR8.1 - 9.0.80 SR8 - 9.0.70 SR7 @@ -122,11 +125,14 @@ body: - 9.0.70 SR7 - 9.0.80 SR8 - 9.0.81 SR8.1 + - 9.0.82 SR8.2 + - 9.0.90 SR9 - 10.0.0-preview.1 - 10.0.0-preview.2 - 10.0.0-preview.3 - 10.0.0-preview.4 - 10.0.0-preview.5 + - 10.0.0-preview.6 validations: required: true - type: dropdown diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 1618a51ae441..1b3a4d197780 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,8 +3,8 @@ contact_links: - name: .NET MAUI Community Support url: https://learn.microsoft.com/answers/topics/dotnet-maui.html about: Please ask and answer questions here. - - name: Bug report or feature request for Visual Studio for Windows and Mac - url: https://learn.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022 + - name: Bug report or feature request for Visual Studio + url: https://learn.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio about: Use Visual Studio's Report a Problem feature for issues and suggestions with Visual Studio tooling - name: Bug report or feature request for Visual Studio Code (including C# Dev Kit) url: https://github.com/microsoft/vscode-dotnettools/issues diff --git a/eng/devices/ios.cake b/eng/devices/ios.cake index ea0243a03e7d..d86e1eae1e2f 100644 --- a/eng/devices/ios.cake +++ b/eng/devices/ios.cake @@ -1,8 +1,8 @@ #addin nuget:?package=Cake.AppleSimulator&version=0.2.0 #load "./uitests-shared.cake" -const string DefaultVersion = "18.0"; -const string DefaultTestDevice = $"ios-simulator-64_{DefaultVersion}"; +const string DefaultVersion = "18.4"; +const string DefaultTestDevice = $"ios-simulator-64"; // Required arguments string DEFAULT_IOS_PROJECT = "../../src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj"; diff --git a/eng/pipelines/azure-pipelines-internal.yml b/eng/pipelines/azure-pipelines-internal.yml index 1d8a593952d0..11c195ef0f45 100644 --- a/eng/pipelines/azure-pipelines-internal.yml +++ b/eng/pipelines/azure-pipelines-internal.yml @@ -27,28 +27,29 @@ schedules: include: - main - net10.0 - + - inflight/current + variables: - - template: /eng/common/templates/variables/pool-providers.yml@self - - template: /eng/pipelines/common/variables.yml@self - - template: /eng/pipelines/arcade/variables.yml@self - - group: DotNetBuilds storage account read tokens - - group: AzureDevOps-Artifact-Feeds-Pats +- template: /eng/common/templates/variables/pool-providers.yml@self +- template: /eng/pipelines/common/variables.yml@self +- template: /eng/pipelines/arcade/variables.yml@self +- group: DotNetBuilds storage account read tokens +- group: AzureDevOps-Artifact-Feeds-Pats parameters: - - name: VM_IMAGE_HOST - type: object - default: - name: NetCore1ESPool-Internal - image: 1es-windows-2022 - os: windows +- name: VM_IMAGE_HOST + type: object + default: + name: NetCore1ESPool-Internal + image: 1es-windows-2022 + os: windows resources: repositories: - - repository: 1ESPipelineTemplates - type: git - name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release extends: ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: @@ -73,7 +74,7 @@ extends: suppression: suppressionFile: $(Build.SourcesDirectory)\eng\automation\guardian\source.gdnsuppress stages: - + - template: /eng/pipelines/arcade/stage-pack.yml@self parameters: pool: ${{ parameters.VM_IMAGE_HOST }} @@ -83,18 +84,17 @@ extends: sourceIndexBuildCommand: build.cmd -restore -build -ci /bl:$(Build.Arcade.LogsPath)sourceIndexBuild.binlog /p:OfficialBuildId=$(_BuildOfficalId) /p:_SkipUpdateBuildNumber=true binlogPath: $(Build.Arcade.LogsPath)sourceIndexBuild.binlog prepareSteps: - - template: /eng/pipelines/common/provision.yml@self - parameters: - checkoutDirectory: '$(System.DefaultWorkingDirectory)' - skipJdk: false - skipAndroidCommonSdks: false - skipAndroidPlatformApis: false - onlyAndroidPlatformDefaultApis: true - skipAndroidEmulatorImages: true - skipAndroidCreateAvds: true - skipProvisioning: true - skipXcode: true - + - template: /eng/pipelines/common/provision.yml@self + parameters: + checkoutDirectory: '$(System.DefaultWorkingDirectory)' + skipJdk: false + skipAndroidCommonSdks: false + skipAndroidPlatformApis: false + onlyAndroidPlatformDefaultApis: true + skipAndroidEmulatorImages: true + skipAndroidCreateAvds: true + skipProvisioning: true + skipXcode: true # Publish and validation steps. Only run in official builds - template: /eng/common/templates-official/post-build/post-build.yml@self parameters: diff --git a/eng/pipelines/common/device-tests-jobs.yml b/eng/pipelines/common/device-tests-jobs.yml index 072116326f7d..eb93d5fd3868 100644 --- a/eng/pipelines/common/device-tests-jobs.yml +++ b/eng/pipelines/common/device-tests-jobs.yml @@ -1,7 +1,7 @@ parameters: platform: '' - pool: { } - versions: [ ] + pool: {} + versions: [] provisionatorChannel: 'latest' skipProvisioning: true agentPoolAccessToken: '' @@ -18,7 +18,7 @@ parameters: name: name desc: Human Description path: /optional/path/to/project.csproj - versionsExclude: [ ] + versionsExclude: [] packageid: '' configuration: '' @@ -76,6 +76,9 @@ jobs: ${{ if contains(version, 'device') }}: device: ios-device apiVersion: ${{ replace(version, 'device-', '') }} + ${{ if contains(version, 'latest') }}: + device: ios-simulator-64 + apiVersion: 18.5 ${{ else }}: device: ios-simulator-64_${{ replace(version, 'simulator-', '') }} apiVersion: ${{ replace(version, 'simulator-', '') }} diff --git a/eng/pipelines/common/ui-tests.yml b/eng/pipelines/common/ui-tests.yml index 742c55fdda3f..e84b23ebe35d 100644 --- a/eng/pipelines/common/ui-tests.yml +++ b/eng/pipelines/common/ui-tests.yml @@ -157,7 +157,7 @@ stages: parameters: platform: ios ${{ if eq(version, 'latest') }}: - version: 18.0 + version: 18.5 ${{ if ne(version, 'latest') }}: version: ${{ version }} path: ${{ project.ios }} @@ -194,7 +194,7 @@ stages: parameters: platform: ios ${{ if eq(version, 'latest') }}: - version: 18.0 + version: 18.5 ${{ if ne(version, 'latest') }}: version: ${{ version }} path: ${{ project.ios }} @@ -232,7 +232,7 @@ stages: parameters: platform: ios ${{ if eq(version, 'latest') }}: - version: 16.4 + version: 18.5 ${{ if ne(version, 'latest') }}: version: ${{ version }} path: ${{ project.ios }} @@ -276,7 +276,7 @@ stages: parameters: platform: ios ${{ if eq(version, 'latest') }}: - version: 18.0 + version: 18.5 ${{ if ne(version, 'latest') }}: version: ${{ version }} path: ${{ project.ios }} @@ -347,7 +347,7 @@ stages: - template: ui-tests-steps.yml parameters: platform: catalyst - version: "13.1" + version: "15.3" device: mac path: ${{ project.mac }} app: ${{ project.app }} diff --git a/eng/pipelines/device-tests.yml b/eng/pipelines/device-tests.yml index 25b561a946ee..d3b22dddfd53 100644 --- a/eng/pipelines/device-tests.yml +++ b/eng/pipelines/device-tests.yml @@ -116,14 +116,14 @@ stages: targetFrameworkVersion: ${{ targetFrameworkVersion }} ${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}: androidApiLevels: [ 33, 30, 29, 28, 27, 26, 25, 24, 23 ] - iosVersions: [ 'simulator-18.0'] + iosVersions: [ 'latest'] catalystVersions: [ 'latest' ] windowsVersions: ['packaged', 'unpackaged'] provisionatorChannel: ${{ parameters.provisionatorChannel }} skipProvisioning: ${{ or(not(parameters.UseProvisionator), false) }} ${{ else }}: androidApiLevels: [ 33, 23 ] - iosVersions: [ 'simulator-18.0' ] + iosVersions: [ 'latest' ] catalystVersions: [ 'latest' ] windowsVersions: ['packaged', 'unpackaged'] provisionatorChannel: ${{ parameters.provisionatorChannel }} diff --git a/eng/pipelines/ui-tests.yml b/eng/pipelines/ui-tests.yml index 0b27928f8735..3276962ebc23 100644 --- a/eng/pipelines/ui-tests.yml +++ b/eng/pipelines/ui-tests.yml @@ -150,11 +150,11 @@ stages: agentPoolAccessToken: $(AgentPoolAccessToken) ${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}: androidApiLevels: [ 30 ] - iosVersions: [ '18.0' ] + iosVersions: [ 'latest' ] provisionatorChannel: ${{ parameters.provisionatorChannel }} ${{ else }}: androidApiLevels: [ 30 ] - iosVersions: [ '18.0' ] + iosVersions: [ 'latest' ] provisionatorChannel: ${{ parameters.provisionatorChannel }} ${{ if parameters.CompatibilityTests }}: runCompatibilityTests: true diff --git a/src/BlazorWebView/tests/MauiDeviceTests/WebViewHelpers.Windows.cs b/src/BlazorWebView/tests/MauiDeviceTests/WebViewHelpers.Windows.cs index f32f55fd5028..a7a3335c2770 100644 --- a/src/BlazorWebView/tests/MauiDeviceTests/WebViewHelpers.Windows.cs +++ b/src/BlazorWebView/tests/MauiDeviceTests/WebViewHelpers.Windows.cs @@ -12,16 +12,22 @@ public static async Task WaitForWebViewReady(WebView2 wv2) { CoreWebView2 coreWebView2 = null; - await Retry( - () => - { - coreWebView2 = wv2.CoreWebView2; - return Task.FromResult(coreWebView2 != null); - }, - timeoutInMS => + // Ensure that the WebView2 runtime is installed and initialized and has a CoreWebView2 instance. + if (wv2?.CoreWebView2 == null) + { + string version = CoreWebView2Environment.GetAvailableBrowserVersionString(null); + if (string.IsNullOrEmpty(version)) { - return Task.FromResult(new Exception($"Waited {timeoutInMS}ms but couldn't get CoreWebView2 to be available.")); - }); + throw new InvalidOperationException("WebView2 runtime is not installed."); + } + await wv2.EnsureCoreWebView2Async(); + } + + await Retry(() => + { + coreWebView2 = wv2.CoreWebView2; + return Task.FromResult(coreWebView2 != null); + }, createExceptionWithTimeoutMS: (int timeoutInMS) => Task.FromResult(new Exception($"Waited {timeoutInMS}ms but couldn't get CoreWebView2 to be available."))); var domLoaded = false; var sem = new SemaphoreSlim(1); diff --git a/src/Compatibility/Core/src/Android/Cells/ViewCellRenderer.cs b/src/Compatibility/Core/src/Android/Cells/ViewCellRenderer.cs index cb5717c496a5..dc359eee5fdc 100644 --- a/src/Compatibility/Core/src/Android/Cells/ViewCellRenderer.cs +++ b/src/Compatibility/Core/src/Android/Cells/ViewCellRenderer.cs @@ -206,8 +206,7 @@ public void Update(ViewCell cell) c.DisableLayout = false; var viewAsLayout = cell.View as Layout; - if (viewAsLayout != null) - viewAsLayout.ForceLayout(); + viewAsLayout?.ForceLayout(); Invalidate(); diff --git a/src/Compatibility/Core/src/Android/CollectionView/CarouselViewRenderer.cs b/src/Compatibility/Core/src/Android/CollectionView/CarouselViewRenderer.cs index 8d87772d3206..a5d31f643c5e 100644 --- a/src/Compatibility/Core/src/Android/CollectionView/CarouselViewRenderer.cs +++ b/src/Compatibility/Core/src/Android/CollectionView/CarouselViewRenderer.cs @@ -190,10 +190,7 @@ protected override void UpdateItemSpacing() var adapter = GetAdapter(); - if (adapter != null) - { - adapter.NotifyItemChanged(_oldPosition); - } + adapter?.NotifyItemChanged(_oldPosition); base.UpdateItemSpacing(); } diff --git a/src/Compatibility/Core/src/Android/Renderers/ScrollViewRenderer.cs b/src/Compatibility/Core/src/Android/Renderers/ScrollViewRenderer.cs index 8f037128de6c..a997eb066353 100644 --- a/src/Compatibility/Core/src/Android/Renderers/ScrollViewRenderer.cs +++ b/src/Compatibility/Core/src/Android/Renderers/ScrollViewRenderer.cs @@ -504,8 +504,7 @@ void UpdateOrientation() if (_container.Parent != this) { _container.RemoveFromParent(); - if (_hScrollView != null) - _hScrollView.RemoveFromParent(); + _hScrollView?.RemoveFromParent(); AddView(_container); } } diff --git a/src/Compatibility/Core/src/Tizen/Forms.cs b/src/Compatibility/Core/src/Tizen/Forms.cs index 37e729ca7310..3397ee7fbd38 100644 --- a/src/Compatibility/Core/src/Tizen/Forms.cs +++ b/src/Compatibility/Core/src/Tizen/Forms.cs @@ -116,14 +116,11 @@ internal static TizenTitleBarVisibility TitleBarVisibility internal static void SendViewInitialized(this VisualElement self, NView nativeView) { EventHandler viewInitialized = Forms.ViewInitialized; - if (viewInitialized != null) + viewInitialized?.Invoke(self, new ViewInitializedEventArgs { - viewInitialized.Invoke(self, new ViewInitializedEventArgs - { - View = self, - NativeView = nativeView - }); - } + View = self, + NativeView = nativeView + }); } public static bool IsInitializedRenderers { get; private set; } diff --git a/src/Compatibility/Core/src/Tizen/FormsApplication.cs b/src/Compatibility/Core/src/Tizen/FormsApplication.cs index cfb45d68868b..64a96bb1b3ae 100644 --- a/src/Compatibility/Core/src/Tizen/FormsApplication.cs +++ b/src/Compatibility/Core/src/Tizen/FormsApplication.cs @@ -53,28 +53,19 @@ protected override void OnPreCreate() protected override void OnTerminate() { base.OnTerminate(); - if (_platform != null) - { - _platform.Dispose(); - } + _platform?.Dispose(); } protected override void OnPause() { base.OnPause(); - if (_application != null) - { - _application.SendSleep(); - } + _application?.SendSleep(); } protected override void OnResume() { base.OnResume(); - if (_application != null) - { - _application.SendResume(); - } + _application?.SendResume(); } [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/src/Compatibility/Core/src/Tizen/Renderers/VisualElementRenderer.cs b/src/Compatibility/Core/src/Tizen/Renderers/VisualElementRenderer.cs index f590927fc7d0..b93a59d93a29 100644 --- a/src/Compatibility/Core/src/Tizen/Renderers/VisualElementRenderer.cs +++ b/src/Compatibility/Core/src/Tizen/Renderers/VisualElementRenderer.cs @@ -599,10 +599,7 @@ protected virtual void UpdateOpacity(bool initialize) /// protected virtual void OnFocused(object sender, EventArgs e) { - if (null != Element) - { - Element.SetValue(VisualElement.IsFocusedPropertyKey, true); - } + Element?.SetValue(VisualElement.IsFocusedPropertyKey, true); } /// @@ -610,10 +607,7 @@ protected virtual void OnFocused(object sender, EventArgs e) /// protected virtual void OnUnfocused(object sender, EventArgs e) { - if (null != Element) - { - Element.SetValue(VisualElement.IsFocusedPropertyKey, false); - } + Element?.SetValue(VisualElement.IsFocusedPropertyKey, false); } /// diff --git a/src/Compatibility/Core/src/Windows/CellControl.cs b/src/Compatibility/Core/src/Windows/CellControl.cs index 8438fcfae181..13575e92eae5 100644 --- a/src/Compatibility/Core/src/Windows/CellControl.cs +++ b/src/Compatibility/Core/src/Windows/CellControl.cs @@ -128,10 +128,7 @@ protected FrameworkElement CellContent // Children still need measure called on them global::Windows.Foundation.Size result = base.MeasureOverride(availableSize); - if (lv != null) - { - lv.SetValue(MeasuredEstimateProperty, result.Height); - } + lv?.SetValue(MeasuredEstimateProperty, result.Height); SetDefaultSwitchColor(); diff --git a/src/Compatibility/Core/src/Windows/FlyoutPageControl.cs b/src/Compatibility/Core/src/Windows/FlyoutPageControl.cs index 95a45e5b940c..babf4f1c460e 100644 --- a/src/Compatibility/Core/src/Windows/FlyoutPageControl.cs +++ b/src/Compatibility/Core/src/Windows/FlyoutPageControl.cs @@ -302,8 +302,7 @@ protected override void OnApplyTemplate() UpdateMode(); - if (_commandBarTcs != null) - _commandBarTcs.SetResult(_commandBar); + _commandBarTcs?.SetResult(_commandBar); _titleViewManager = new TitleViewManager(this); } diff --git a/src/Compatibility/Core/src/Windows/FlyoutPageRenderer.cs b/src/Compatibility/Core/src/Windows/FlyoutPageRenderer.cs index fe1539cf88c6..4aa7a61ee156 100644 --- a/src/Compatibility/Core/src/Windows/FlyoutPageRenderer.cs +++ b/src/Compatibility/Core/src/Windows/FlyoutPageRenderer.cs @@ -42,8 +42,7 @@ protected VisualElementTracker Tracker if (_tracker == value) return; - if (_tracker != null) - _tracker.Dispose(); + _tracker?.Dispose(); _tracker = value; } diff --git a/src/Compatibility/Core/src/Windows/ListGroupHeaderPresenter.cs b/src/Compatibility/Core/src/Windows/ListGroupHeaderPresenter.cs index e826f0c07034..619bac2b0de9 100644 --- a/src/Compatibility/Core/src/Windows/ListGroupHeaderPresenter.cs +++ b/src/Compatibility/Core/src/Windows/ListGroupHeaderPresenter.cs @@ -27,10 +27,7 @@ void OnTapped(object sender, TappedRoutedEventArgs tappedRoutedEventArgs) zoom.ToggleActiveView(); var grid = zoom.ZoomedOutView as GridView; - if (grid != null) - { - grid.MakeVisible(new SemanticZoomLocation { Item = DataContext }); - } + grid?.MakeVisible(new SemanticZoomLocation { Item = DataContext }); return; } diff --git a/src/Compatibility/Core/src/Windows/NavigationPageRenderer.cs b/src/Compatibility/Core/src/Windows/NavigationPageRenderer.cs index 017835ab299e..1c95aa29332e 100644 --- a/src/Compatibility/Core/src/Windows/NavigationPageRenderer.cs +++ b/src/Compatibility/Core/src/Windows/NavigationPageRenderer.cs @@ -48,8 +48,7 @@ protected VisualElementTracker Tracker if (_tracker == value) return; - if (_tracker != null) - _tracker.Dispose(); + _tracker?.Dispose(); _tracker = value; } diff --git a/src/Compatibility/Core/src/Windows/Platform.cs b/src/Compatibility/Core/src/Windows/Platform.cs index 4c06c76ac5e5..16f8b6605919 100644 --- a/src/Compatibility/Core/src/Windows/Platform.cs +++ b/src/Compatibility/Core/src/Windows/Platform.cs @@ -433,8 +433,7 @@ void RemovePage(Page page) if (_container == null || page == null) return; - if (_modalBackgroundPage != null) - _modalBackgroundPage.GetCurrentPage()?.SendAppearing(); + _modalBackgroundPage?.GetCurrentPage()?.SendAppearing(); IVisualElementRenderer pageRenderer = GetRenderer(page); @@ -449,8 +448,7 @@ void AddPage(Page page) if (_container == null || page == null) return; - if (_modalBackgroundPage != null) - _modalBackgroundPage.GetCurrentPage()?.SendDisappearing(); + _modalBackgroundPage?.GetCurrentPage()?.SendDisappearing(); diff --git a/src/Compatibility/Core/src/Windows/ScrollViewRenderer.cs b/src/Compatibility/Core/src/Windows/ScrollViewRenderer.cs index cc5467fecb83..ba50c2d2a568 100644 --- a/src/Compatibility/Core/src/Windows/ScrollViewRenderer.cs +++ b/src/Compatibility/Core/src/Windows/ScrollViewRenderer.cs @@ -76,8 +76,7 @@ void CleanUp(ScrollView scrollView, ScrollViewer scrollViewer) } } - if (_currentView != null) - _currentView.Cleanup(); + _currentView?.Cleanup(); } protected override void OnElementChanged(ElementChangedEventArgs e) @@ -130,8 +129,7 @@ protected void OnContentElementPropertyChanged(object sender, PropertyChangedEve void UpdateContent() { - if (_currentView != null) - _currentView.Cleanup(); + _currentView?.Cleanup(); if (Control?.Content is FrameworkElement oldElement) { @@ -148,7 +146,7 @@ void UpdateContent() if (_currentView != null) renderer = _currentView.GetOrCreateRenderer(); - Control.Content = renderer != null ? renderer.ContainerElement : null; + Control.Content = renderer?.ContainerElement; UpdateContentMargins(); if (renderer?.Element != null) diff --git a/src/Compatibility/Core/src/Windows/Shapes/ShapeRenderer.cs b/src/Compatibility/Core/src/Windows/Shapes/ShapeRenderer.cs index bad9728ab934..cde7117b009b 100644 --- a/src/Compatibility/Core/src/Windows/Shapes/ShapeRenderer.cs +++ b/src/Compatibility/Core/src/Windows/Shapes/ShapeRenderer.cs @@ -144,8 +144,7 @@ void UpdateStrokeThickness() void UpdateStrokeDashArray() { - if (Control.StrokeDashArray != null) - Control.StrokeDashArray.Clear(); + Control.StrokeDashArray?.Clear(); if (Element.StrokeDashArray != null && Element.StrokeDashArray.Count > 0) { diff --git a/src/Compatibility/Core/src/Windows/TabbedPageRenderer.cs b/src/Compatibility/Core/src/Windows/TabbedPageRenderer.cs index 9deacf7ea951..de9975c58c54 100644 --- a/src/Compatibility/Core/src/Windows/TabbedPageRenderer.cs +++ b/src/Compatibility/Core/src/Windows/TabbedPageRenderer.cs @@ -63,8 +63,7 @@ protected VisualElementTracker Tracker if (_tracker == value) return; - if (_tracker != null) - _tracker.Dispose(); + _tracker?.Dispose(); _tracker = value; } diff --git a/src/Compatibility/Core/src/Windows/VisualElementRenderer.cs b/src/Compatibility/Core/src/Windows/VisualElementRenderer.cs index 3a4d32c04afb..9df6e3a40eef 100644 --- a/src/Compatibility/Core/src/Windows/VisualElementRenderer.cs +++ b/src/Compatibility/Core/src/Windows/VisualElementRenderer.cs @@ -156,8 +156,7 @@ public void SetElement(VisualElement element) // and may cause issues //Loaded += (sender, args) => //{ - if (Packager != null) - Packager.Load(); + Packager?.Load(); //}; } @@ -201,10 +200,7 @@ event EventHandler IVisualNativeElementRenderer.ControlChanged var myRect = new WRect(0, 0, finalSize.Width, finalSize.Height); - if (Control != null) - { - Control.Arrange(myRect); - } + Control?.Arrange(myRect); List arrangedChildren = null; for (var i = 0; i < ElementController.LogicalChildren.Count; i++) diff --git a/src/Compatibility/Core/src/Windows/WebViewRenderer.cs b/src/Compatibility/Core/src/Windows/WebViewRenderer.cs index 8c2b3e75971a..48e1bb8e72c3 100644 --- a/src/Compatibility/Core/src/Windows/WebViewRenderer.cs +++ b/src/Compatibility/Core/src/Windows/WebViewRenderer.cs @@ -360,8 +360,7 @@ void SyncNativeCookies(string url) void Load() { - if (Element.Source != null) - Element.Source.Load(this); + Element.Source?.Load(this); UpdateCanGoBackForward(); } diff --git a/src/Compatibility/Core/src/iOS/Cells/CellTableViewCell.cs b/src/Compatibility/Core/src/iOS/Cells/CellTableViewCell.cs index e644d5dc1c0b..1d6cc3cff84d 100644 --- a/src/Compatibility/Core/src/iOS/Cells/CellTableViewCell.cs +++ b/src/Compatibility/Core/src/iOS/Cells/CellTableViewCell.cs @@ -92,8 +92,7 @@ internal static UITableViewCell GetNativeCell(UITableView tableView, Cell cell, } // Because the layer was hidden we need to layout the cell by hand - if (cellWithContent != null) - cellWithContent.LayoutSubviews(); + cellWithContent?.LayoutSubviews(); return nativeCell; } diff --git a/src/Compatibility/Core/src/iOS/CollectionView/ItemsViewRenderer.cs b/src/Compatibility/Core/src/iOS/CollectionView/ItemsViewRenderer.cs index c6d43b4c3179..af510aeafe36 100644 --- a/src/Compatibility/Core/src/iOS/CollectionView/ItemsViewRenderer.cs +++ b/src/Compatibility/Core/src/iOS/CollectionView/ItemsViewRenderer.cs @@ -118,10 +118,7 @@ protected virtual void UpdateLayout() { _layout = SelectLayout(); - if (Controller != null) - { - Controller.UpdateLayout(_layout); - } + Controller?.UpdateLayout(_layout); } protected virtual void UpdateItemSizingStrategy() diff --git a/src/Compatibility/Core/src/iOS/CollectionView/StructuredItemsViewController.cs b/src/Compatibility/Core/src/iOS/CollectionView/StructuredItemsViewController.cs index c0362cb6e46d..e53f629a690c 100644 --- a/src/Compatibility/Core/src/iOS/CollectionView/StructuredItemsViewController.cs +++ b/src/Compatibility/Core/src/iOS/CollectionView/StructuredItemsViewController.cs @@ -140,9 +140,9 @@ internal void UpdateSubview(object view, DataTemplate viewTemplate, nint viewTag RemeasureLayout(formsElement); formsElement.MeasureInvalidated += OnFormsElementMeasureInvalidated; } - else if (uiView != null) + else { - uiView.SizeToFit(); + uiView?.SizeToFit(); } } diff --git a/src/Compatibility/Core/src/iOS/Renderers/ActivityIndicatorRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/ActivityIndicatorRenderer.cs index e2aa9c73045b..b31b43262c26 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/ActivityIndicatorRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/ActivityIndicatorRenderer.cs @@ -77,7 +77,7 @@ protected override void OnElementPropertyChanged(object sender, PropertyChangedE [PortHandler] void UpdateColor() { - Control.Color = Element.Color == null ? null : Element.Color.ToPlatform(); + Control.Color = Element.Color?.ToPlatform(); } [PortHandler] diff --git a/src/Compatibility/Core/src/iOS/Renderers/ButtonRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/ButtonRenderer.cs index eda73f82a2e4..a0b65bb65a0d 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/ButtonRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/ButtonRenderer.cs @@ -164,7 +164,7 @@ protected override void SetBackground(Brush brush) if (Control == null) return; - UIColor backgroundColor = Element.BackgroundColor == null ? null : Element.BackgroundColor.ToPlatform(); + UIColor backgroundColor = Element.BackgroundColor?.ToPlatform(); if (!Brush.IsNullOrEmpty(brush)) { diff --git a/src/Compatibility/Core/src/iOS/Renderers/CarouselPageRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/CarouselPageRenderer.cs index 6d3514a6aa8a..3bcd9277a215 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/CarouselPageRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/CarouselPageRenderer.cs @@ -68,8 +68,7 @@ public void SetElement(VisualElement element) OnElementChanged(new VisualElementChangedEventArgs(oldElement, element)); - if (element != null) - element.SendViewInitialized(NativeView); + element?.SendViewInitialized(NativeView); _previousPage = Carousel?.CurrentPage; } diff --git a/src/Compatibility/Core/src/iOS/Renderers/ListViewRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/ListViewRenderer.cs index 38b1eda611b1..44375409000c 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/ListViewRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/ListViewRenderer.cs @@ -561,8 +561,7 @@ void UpdateHeader() void UpdateIsRefreshing() { var refreshing = Element.IsRefreshing; - if (_tableViewController != null) - _tableViewController.UpdateIsRefreshing(refreshing); + _tableViewController?.UpdateIsRefreshing(refreshing); } void UpdateItems(NotifyCollectionChangedEventArgs e, int section, bool resetWhenGrouped) @@ -779,8 +778,7 @@ void UpdateSpinnerColor() { var color = Element.RefreshControlColor; - if (_tableViewController != null) - _tableViewController.UpdateRefreshControlColor(color?.ToPlatform()); + _tableViewController?.UpdateRefreshControlColor(color?.ToPlatform()); } void UpdateVerticalScrollBarVisibility() diff --git a/src/Compatibility/Core/src/iOS/Renderers/NavigationRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/NavigationRenderer.cs index 6b85dadcdd82..07295549a43a 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/NavigationRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/NavigationRenderer.cs @@ -78,8 +78,7 @@ public void SetElement(VisualElement element) Element = element; OnElementChanged(new VisualElementChangedEventArgs(oldElement, element)); - if (element != null) - element.SendViewInitialized(NativeView); + element?.SendViewInitialized(NativeView); EffectUtilities.RegisterEffectControlProvider(this, oldElement, element); } @@ -271,8 +270,7 @@ protected override void Dispose(bool disposing) foreach (var childViewController in ViewControllers) childViewController.Dispose(); - if (_tracker != null) - _tracker.Dispose(); + _tracker?.Dispose(); _secondaryToolbar.RemoveFromSuperview(); _secondaryToolbar.Dispose(); @@ -1420,8 +1418,7 @@ void UpdateToolbarItems() (primaries = primaries ?? new List()).Add(item.ToUIBarButtonItem()); } - if (primaries != null) - primaries.Reverse(); + primaries?.Reverse(); NavigationItem.SetRightBarButtonItems(primaries == null ? Array.Empty() : primaries.ToArray(), false); ToolbarItems = secondaries == null ? Array.Empty() : secondaries.ToArray(); @@ -1656,8 +1653,7 @@ public UIImageView Icon { set { - if (_icon != null) - _icon.RemoveFromSuperview(); + _icon?.RemoveFromSuperview(); _icon = value; diff --git a/src/Compatibility/Core/src/iOS/Renderers/PhoneFlyoutPageRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/PhoneFlyoutPageRenderer.cs index 437a6d82c93d..fadd2d27c6bc 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/PhoneFlyoutPageRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/PhoneFlyoutPageRenderer.cs @@ -94,8 +94,7 @@ public void SetElement(VisualElement element) EffectUtilities.RegisterEffectControlProvider(this, oldElement, element); - if (element != null) - element.SendViewInitialized(NativeView); + element?.SendViewInitialized(NativeView); } public void SetElementSize(Size size) diff --git a/src/Compatibility/Core/src/iOS/Renderers/ProgressBarRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/ProgressBarRenderer.cs index 10e8818dd905..26fe8a66db27 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/ProgressBarRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/ProgressBarRenderer.cs @@ -56,13 +56,13 @@ protected override void SetBackgroundColor(Color color) if (Control == null) return; - Control.TrackTintColor = color != null ? color.ToPlatform() : null; + Control.TrackTintColor = color?.ToPlatform(); } [PortHandler] void UpdateProgressColor() { - Control.ProgressTintColor = Element.ProgressColor == null ? null : Element.ProgressColor.ToPlatform(); + Control.ProgressTintColor = Element.ProgressColor?.ToPlatform(); } [PortHandler] diff --git a/src/Compatibility/Core/src/iOS/Renderers/ScrollViewRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/ScrollViewRenderer.cs index 79542e8d2cb4..b214b940d3f4 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/ScrollViewRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/ScrollViewRenderer.cs @@ -108,8 +108,7 @@ public void SetElement(VisualElement element) EffectUtilities.RegisterEffectControlProvider(this, oldElement, element); - if (element != null) - element.SendViewInitialized(this); + element?.SendViewInitialized(this); if (!string.IsNullOrEmpty(element.AutomationId)) AccessibilityIdentifier = element.AutomationId; @@ -336,8 +335,7 @@ CoreGraphics.CGSize RetrieveElementContentSize() void UpdateScrollPosition() { - if (ScrollView != null) - ScrollView.SetScrolledPosition(ContentOffset.X, ContentOffset.Y); + ScrollView?.SetScrolledPosition(ContentOffset.X, ContentOffset.Y); } void IEffectControlProvider.RegisterEffect(Effect effect) diff --git a/src/Compatibility/Core/src/iOS/Renderers/SwipeViewRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/SwipeViewRenderer.cs index e268af3166de..1f71d941b175 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/SwipeViewRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/SwipeViewRenderer.cs @@ -178,8 +178,7 @@ protected override void SetBackground(Brush brush) if (Brush.IsNullOrEmpty(background)) return; - if (Control != null) - Control.UpdateBackground(background); + Control?.UpdateBackground(background); } public override void TouchesEnded(NSSet touches, UIEvent evt) diff --git a/src/Compatibility/Core/src/iOS/Renderers/TabbedRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/TabbedRenderer.cs index c00e027ef77b..4d37ef791fd8 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/TabbedRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/TabbedRenderer.cs @@ -78,8 +78,7 @@ public void SetElement(VisualElement element) OnPagesChanged(null, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); - if (element != null) - element.SendViewInitialized(NativeView); + element?.SendViewInitialized(NativeView); //disable edit/reorder of tabs CustomizableViewControllers = null; diff --git a/src/Compatibility/Core/src/iOS/Renderers/TableViewModelRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/TableViewModelRenderer.cs index fc8eb74631e2..8e86b9ec2b60 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/TableViewModelRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/TableViewModelRenderer.cs @@ -21,8 +21,7 @@ public TableViewModelRenderer(TableView model) View = model; View.ModelChanged += (s, e) => { - if (Table != null) - Table.ReloadData(); + Table?.ReloadData(); }; AutomaticallyDeselect = true; } diff --git a/src/Compatibility/Core/src/iOS/Renderers/TabletFlyoutPageRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/TabletFlyoutPageRenderer.cs index 9c89e8f3171d..0451da69cbb5 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/TabletFlyoutPageRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/TabletFlyoutPageRenderer.cs @@ -223,8 +223,7 @@ public void SetElement(VisualElement element) EffectUtilities.RegisterEffectControlProvider(this, oldElement, element); - if (element != null) - element.SendViewInitialized(NativeView); + element?.SendViewInitialized(NativeView); } public void SetElementSize(Size size) diff --git a/src/Compatibility/Core/src/iOS/Renderers/UIContainerCell.cs b/src/Compatibility/Core/src/iOS/Renderers/UIContainerCell.cs index d50b60a90202..d8dd7c43dff6 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/UIContainerCell.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/UIContainerCell.cs @@ -34,8 +34,7 @@ internal UIContainerCell(string cellId, View view, Shell shell, object context) ContentView.ClipsToBounds = true; BindingContext = context; - if (shell != null) - shell.AddLogicalChild(View); + shell?.AddLogicalChild(View); } @@ -68,8 +67,7 @@ internal void Disconnect(Shell shell = null, bool keepRenderer = false) if (!keepRenderer) Platform.SetRenderer(View, null); - if (shell != null) - shell.RemoveLogicalChild(shell); + shell?.RemoveLogicalChild(shell); View = null; TableView = null; @@ -102,8 +100,7 @@ public object BindingContext public override void LayoutSubviews() { base.LayoutSubviews(); - if (View != null) - View.Layout(Bounds.ToRectangle()); + View?.Layout(Bounds.ToRectangle()); } void UpdateVisualState() diff --git a/src/Compatibility/Core/src/iOS/Renderers/WkWebViewRenderer.cs b/src/Compatibility/Core/src/iOS/Renderers/WkWebViewRenderer.cs index a9b50caa341b..dcb88d0e2866 100644 --- a/src/Compatibility/Core/src/iOS/Renderers/WkWebViewRenderer.cs +++ b/src/Compatibility/Core/src/iOS/Renderers/WkWebViewRenderer.cs @@ -126,8 +126,7 @@ public void SetElement(VisualElement element) if (Element != null && !string.IsNullOrEmpty(Element.AutomationId)) AccessibilityIdentifier = Element.AutomationId; - if (element != null) - element.SendViewInitialized(this); + element?.SendViewInitialized(this); } public void SetElementSize(Size size) @@ -589,8 +588,7 @@ void Load() if (_ignoreSourceChanges) return; - if (((WebView)Element).Source != null) - ((WebView)Element).Source.Load(this); + ((WebView)Element).Source?.Load(this); UpdateCanGoBackForward(); } diff --git a/src/Controls/Foldable/src/Android/FoldableService.cs b/src/Controls/Foldable/src/Android/FoldableService.cs index efa73b2f951a..85924ea3ea06 100644 --- a/src/Controls/Foldable/src/Android/FoldableService.cs +++ b/src/Controls/Foldable/src/Android/FoldableService.cs @@ -401,8 +401,7 @@ void SetHingeAngle(int hingeAngle) _gettingHingeAngle = null; } - if (toSet != null) - toSet.SetResult(hingeAngle); + toSet?.SetResult(hingeAngle); } } diff --git a/src/Controls/src/Core/Compatibility/Handlers/Android/VisualElementRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Android/VisualElementRenderer.cs index 88c05a9a3649..5d61dcb51b0d 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Android/VisualElementRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Android/VisualElementRenderer.cs @@ -48,10 +48,7 @@ protected override void OnLayout(bool changed, int l, int t, int r, int b) if (ChildCount > 0) { var platformView = GetChildAt(0); - if (platformView != null) - { - platformView.Layout(0, 0, r - l, b - t); - } + platformView?.Layout(0, 0, r - l, b - t); } } diff --git a/src/Controls/src/Core/Compatibility/Handlers/ListView/Android/EntryCellView.cs b/src/Controls/src/Core/Compatibility/Handlers/ListView/Android/EntryCellView.cs index 681aad2a85bd..88c734e666e0 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/ListView/Android/EntryCellView.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/ListView/Android/EntryCellView.cs @@ -122,7 +122,7 @@ void ITextWatcher.OnTextChanged(ICharSequence s, int start, int before, int coun { Action changed = TextChanged; if (changed != null) - changed(s != null ? s.ToString() : null); + changed(s?.ToString()); } public void SetLabelTextColor(Color color, int defaultColorResourceId) diff --git a/src/Controls/src/Core/Compatibility/Handlers/ListView/Windows/CellControl.cs b/src/Controls/src/Core/Compatibility/Handlers/ListView/Windows/CellControl.cs index 7986d7d5ed65..9a73a1ef370e 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/ListView/Windows/CellControl.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/ListView/Windows/CellControl.cs @@ -148,10 +148,7 @@ protected FrameworkElement CellContent // Children still need measure called on them global::Windows.Foundation.Size result = base.MeasureOverride(availableSize); - if (lv != null) - { - lv.SetValue(MeasuredEstimateProperty, result.Height); - } + lv?.SetValue(MeasuredEstimateProperty, result.Height); SetDefaultSwitchColor(); diff --git a/src/Controls/src/Core/Compatibility/Handlers/ListView/Windows/ListGroupHeaderPresenter.cs b/src/Controls/src/Core/Compatibility/Handlers/ListView/Windows/ListGroupHeaderPresenter.cs index ee83a0a5977a..15b556b8dd8a 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/ListView/Windows/ListGroupHeaderPresenter.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/ListView/Windows/ListGroupHeaderPresenter.cs @@ -26,10 +26,7 @@ void OnTapped(object sender, TappedRoutedEventArgs tappedRoutedEventArgs) zoom.ToggleActiveView(); var grid = zoom.ZoomedOutView as GridView; - if (grid != null) - { - grid.MakeVisible(new SemanticZoomLocation { Item = DataContext }); - } + grid?.MakeVisible(new SemanticZoomLocation { Item = DataContext }); return; } diff --git a/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/CellTableViewCell.cs b/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/CellTableViewCell.cs index 650d1fc20d72..bac7e104ccc9 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/CellTableViewCell.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/CellTableViewCell.cs @@ -107,8 +107,7 @@ internal static UITableViewCell GetPlatformCell(UITableView tableView, Cell cell } // Because the layer was hidden we need to layout the cell by hand - if (cellWithContent != null) - cellWithContent.LayoutSubviews(); + cellWithContent?.LayoutSubviews(); return platformCell; } diff --git a/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ListViewRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ListViewRenderer.cs index bd8a05fc0604..738f0ce28712 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ListViewRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ListViewRenderer.cs @@ -492,8 +492,7 @@ void OnScrollToRequested(object sender, ScrollToRequestedEventArgs e) if (OperatingSystem.IsIOSVersionAtLeast(11) || OperatingSystem.IsTvOSVersionAtLeast(11)) this.BeginInvokeOnMainThread(() => { - if (Control != null /*&& !_disposed*/) - Control.ScrollToRow(NSIndexPath.FromRowSection(index, 0), position, e.ShouldAnimate); + Control?.ScrollToRow(NSIndexPath.FromRowSection(index, 0), position, e.ShouldAnimate); }); else Control.ScrollToRow(NSIndexPath.FromRowSection(index, 0), position, e.ShouldAnimate); @@ -581,8 +580,7 @@ void UpdateHeader() void UpdateIsRefreshing() { var refreshing = Element.IsRefreshing; - if (_tableViewController != null) - _tableViewController.UpdateIsRefreshing(refreshing); + _tableViewController?.UpdateIsRefreshing(refreshing); } void UpdateItems(NotifyCollectionChangedEventArgs e, int section, bool resetWhenGrouped) @@ -812,8 +810,7 @@ void UpdateSpinnerColor() { var color = Element.RefreshControlColor; - if (_tableViewController != null) - _tableViewController.UpdateRefreshControlColor(color?.ToPlatform()); + _tableViewController?.UpdateRefreshControlColor(color?.ToPlatform()); } void UpdateVerticalScrollBarVisibility() diff --git a/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs index 9559849fc4fe..f1e2ac75a77e 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs @@ -2112,8 +2112,7 @@ public UIImageView Icon { set { - if (_icon != null) - _icon.RemoveFromSuperview(); + _icon?.RemoveFromSuperview(); _icon = value; @@ -2186,4 +2185,4 @@ protected override void Dispose(bool disposing) } } } -} +} \ No newline at end of file diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSectionRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSectionRenderer.cs index 24ceab4a95cf..c04fb0afa922 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSectionRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSectionRenderer.cs @@ -166,10 +166,7 @@ void UpdateTabTitle(ShellContent shellContent) if (index >= 0) { var tab = _tablayout.GetTabAt(index); - if (tab != null) - { - tab.SetText(new string(shellContent.Title)); - } + tab?.SetText(new string(shellContent.Title)); } } diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutRenderer.cs index f20d145832eb..4ddb69f39500 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutRenderer.cs @@ -450,10 +450,7 @@ void LayoutSidebar(bool animate, bool cancelExisting = false) { FlyoutTransition.LayoutViews(View.Bounds, IsOpen ? 1 : 0, Flyout.ViewController.View, Detail.View, _flyoutBehavior); - if (TapoffView != null) - { - TapoffView.Layer.AddAnimation(tapOffViewAnimation, "opacity"); - } + TapoffView?.Layer.AddAnimation(tapOffViewAnimation, "opacity"); }); _flyoutAnimation.AddCompletion((p) => diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs index 007bc5b4c1a5..9ad9ad971baf 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs @@ -797,17 +797,14 @@ protected virtual void UpdateSearchVisibility(UISearchController searchControlle void UpdateFlowDirection() { var shell = _context?.Shell; - - if (shell is null) + if (shell is null || _searchController is null) { return; } - _searchHandlerAppearanceTracker?.UpdateFlowDirection(shell); - - if (_searchController?.View is not null) + if (_searchController != null) { - _searchController.View.UpdateFlowDirection(shell); + _searchController.View?.UpdateFlowDirection(shell); _searchController.SearchBar.UpdateFlowDirection(shell); } } diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs index f0e7ff035a70..811803b610a0 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs @@ -773,9 +773,9 @@ public override void DidShowViewController(UINavigationController navigationCont source.TrySetResult(true); tasks.Remove(viewController); } - else if (popTask != null) + else { - popTask.TrySetResult(true); + popTask?.TrySetResult(true); } } diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs index 51a6c3707f6f..b93e55b34e83 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs @@ -50,8 +50,8 @@ internal UIContainerCell(string cellId, View view, Shell shell, object context) if (BindingContext is BaseShellItem bsi) bsi.AddLogicalChild(View); - else if (shell != null) - shell.AddLogicalChild(View); + else + shell?.AddLogicalChild(View); } public UIContainerCell(string cellId, View view) : this(cellId, view, null, null) @@ -80,8 +80,8 @@ internal void Disconnect(Shell shell = null, bool keepRenderer = false) if (View.Parent is BaseShellItem bsi) bsi.RemoveLogicalChild(View); - else if (shell != null) - shell.RemoveLogicalChild(View); + else + shell?.RemoveLogicalChild(View); _bindingContext = null; diff --git a/src/Controls/src/Core/Compatibility/Handlers/TableView/iOS/TableViewRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/TableView/iOS/TableViewRenderer.cs index b99292c78038..b2ac7b8f44fd 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/TableView/iOS/TableViewRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/TableView/iOS/TableViewRenderer.cs @@ -81,8 +81,7 @@ protected override void OnElementChanged(ElementChangedEventArgs e) if (Control == null || Control.Style != style) { - if (Control != null) - Control.Dispose(); + Control?.Dispose(); var tv = CreateNativeControl(); _originalBackgroundView = tv.BackgroundView; diff --git a/src/Controls/src/Core/Element/Element.Windows.cs b/src/Controls/src/Core/Element/Element.Windows.cs index 7e7a5b4f29b4..aa249666f61e 100644 --- a/src/Controls/src/Core/Element/Element.Windows.cs +++ b/src/Controls/src/Core/Element/Element.Windows.cs @@ -9,6 +9,9 @@ public partial class Element { public static void MapAutomationPropertiesIsInAccessibleTree(IElementHandler handler, Element element) { + if (handler.IsConnectingHandler() && element.GetValue(AutomationProperties.IsInAccessibleTreeProperty) is null) + return; + Platform.AccessibilityExtensions.SetAutomationPropertiesAccessibilityView( handler.PlatformView as Microsoft.UI.Xaml.FrameworkElement, element); } diff --git a/src/Controls/src/Core/Handlers/Items/Android/MauiCarouselRecyclerView.cs b/src/Controls/src/Core/Handlers/Items/Android/MauiCarouselRecyclerView.cs index 0838765d1d26..8e0a4f63272d 100644 --- a/src/Controls/src/Core/Handlers/Items/Android/MauiCarouselRecyclerView.cs +++ b/src/Controls/src/Core/Handlers/Items/Android/MauiCarouselRecyclerView.cs @@ -169,10 +169,7 @@ protected override void UpdateItemSpacing() var adapter = GetAdapter(); - if (adapter != null) - { - adapter.NotifyItemChanged(_oldPosition); - } + adapter?.NotifyItemChanged(_oldPosition); base.UpdateItemSpacing(); } diff --git a/src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs b/src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs index d70b9c92c8d9..ad1e022f0c69 100644 --- a/src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs +++ b/src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs @@ -44,14 +44,11 @@ protected override UICollectionViewDelegateFlowLayout CreateDelegator() protected override IItemsViewSource CreateItemsViewSource() { - if (ItemsSource != null) - { - // There's a bug in the current Maui Controls library. - // It will call "CreateItemsViewSource" 2x in a row when opening a page. - // It's invoked from both ViewDidLoad & UpdateItemsSource - // For the time being, until the issue is fixed, we need to dispose of the current source if one already exist. - ItemsSource.Dispose(); - } + // There's a bug in the current Maui Controls library. + // It will call "CreateItemsViewSource" 2x in a row when opening a page. + // It's invoked from both ViewDidLoad & UpdateItemsSource + // For the time being, until the issue is fixed, we need to dispose of the current source if one already exist. + ItemsSource?.Dispose(); return base.CreateItemsViewSource(); } diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs index 3856fc89ac52..9b908729daea 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs @@ -272,7 +272,6 @@ public static UICollectionViewLayout CreateCarouselLayout( NSCollectionLayoutDimension itemHeight = NSCollectionLayoutDimension.CreateFractionalHeight(1); NSCollectionLayoutDimension groupWidth = NSCollectionLayoutDimension.CreateFractionalWidth(1); NSCollectionLayoutDimension groupHeight = NSCollectionLayoutDimension.CreateFractionalHeight(1); - nfloat itemSpacing = 0; NSCollectionLayoutGroup group = null; var layout = new UICollectionViewCompositionalLayout((sectionIndex, environment) => @@ -325,7 +324,10 @@ public static UICollectionViewLayout CreateCarouselLayout( } var section = NSCollectionLayoutSection.Create(group: group); - section.InterGroupSpacing = itemSpacing; + if (itemsView.ItemsLayout is LinearItemsLayout linearItemsLayout) + { + section.InterGroupSpacing = (nfloat)linearItemsLayout.ItemSpacing; + } section.OrthogonalScrollingBehavior = isHorizontal ? UICollectionLayoutSectionOrthogonalScrollingBehavior.GroupPagingCentered : UICollectionLayoutSectionOrthogonalScrollingBehavior.None; diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs index 2cf389c6a485..616987b09192 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs @@ -44,14 +44,11 @@ protected override UICollectionViewDelegateFlowLayout CreateDelegator() protected override Items.IItemsViewSource CreateItemsViewSource() { - if (ItemsSource != null) - { - // There's a bug in the current Maui Controls library. - // It will call "CreateItemsViewSource" 2x in a row when opening a page. - // It's invoked from both ViewDidLoad & UpdateItemsSource - // For the time being, until the issue is fixed, we need to dispose of the current source if one already exist. - ItemsSource.Dispose(); - } + // There's a bug in the current Maui Controls library. + // It will call "CreateItemsViewSource" 2x in a row when opening a page. + // It's invoked from both ViewDidLoad & UpdateItemsSource + // For the time being, until the issue is fixed, we need to dispose of the current source if one already exist. + ItemsSource?.Dispose(); return base.CreateItemsViewSource(); } diff --git a/src/Controls/src/Core/Handlers/Shell/Tizen/ShellView.cs b/src/Controls/src/Core/Handlers/Shell/Tizen/ShellView.cs index 726e2c5ee81f..5220a30c0e1d 100644 --- a/src/Controls/src/Core/Handlers/Shell/Tizen/ShellView.cs +++ b/src/Controls/src/Core/Handlers/Shell/Tizen/ShellView.cs @@ -145,8 +145,7 @@ public void UpdateBackgroundColor(GColor color) public void UpdateCurrentItem(ShellItem newItem) { - if (_currentItemHandler != null) - _currentItemHandler.Dispose(); + _currentItemHandler?.Dispose(); if (newItem != null) { diff --git a/src/Controls/src/Core/Label/Label.Mapper.cs b/src/Controls/src/Core/Label/Label.Mapper.cs index 27075c8496a0..9fe7e5f06072 100644 --- a/src/Controls/src/Core/Label/Label.Mapper.cs +++ b/src/Controls/src/Core/Label/Label.Mapper.cs @@ -25,7 +25,7 @@ public partial class Label // these are really a single property LabelHandler.Mapper.ReplaceMapping(nameof(Text), MapText); - LabelHandler.Mapper.ReplaceMapping(nameof(FormattedText), MapText); + LabelHandler.Mapper.ReplaceMapping(nameof(FormattedText), MapFormattedText); LabelHandler.Mapper.ReplaceMapping(nameof(LineBreakMode), MapLineBreakMode); LabelHandler.Mapper.ReplaceMapping(nameof(MaxLines), MapMaxLines); @@ -58,8 +58,19 @@ public static void MapTextType(ILabelHandler handler, Label label) => MapTextOrFormattedText(handler, label); static void MapTextTransform(ILabelHandler handler, Label label) => MapTextOrFormattedText(handler, label); + static void MapFormattedText(ILabelHandler handler, Label label) + { + if (label.IsConnectingHandler()) + return; + + MapText(handler, label); + } + static void MapTextOrFormattedText(ILabelHandler handler, Label label) { + if (label.IsConnectingHandler()) + return; + if (label.HasFormattedTextSpans) handler.UpdateValue(nameof(FormattedText)); else diff --git a/src/Controls/src/Core/NavigationProxy.cs b/src/Controls/src/Core/NavigationProxy.cs index f9e86ecd5537..af1f81a19dd5 100644 --- a/src/Controls/src/Core/NavigationProxy.cs +++ b/src/Controls/src/Core/NavigationProxy.cs @@ -244,6 +244,7 @@ protected virtual void OnRemovePage(Page page) { currentInner.RemovePage(page); } + page?.DisconnectHandlers(); } Page Pop() diff --git a/src/Controls/src/Core/Platform/Android/Extensions/ToolbarExtensions.cs b/src/Controls/src/Core/Platform/Android/Extensions/ToolbarExtensions.cs index f341b1a5f049..eb8e5dd7a673 100644 --- a/src/Controls/src/Core/Platform/Android/Extensions/ToolbarExtensions.cs +++ b/src/Controls/src/Core/Platform/Android/Extensions/ToolbarExtensions.cs @@ -232,9 +232,22 @@ public static void UpdateMenuItems(this AToolbar toolbar, if (sortedToolbarItems == null || previousMenuItems == null) return; - var context = mauiContext.Context; var menu = toolbar.Menu; + // menu items can be deleted by Android after switching activities, removing outdated menu items first + if (menu != null) + { + for (var j = previousMenuItems.Count - 1; j >= 0; j--) + { + var previousMenuItem = previousMenuItems[j]; + if (menu.FindItem(previousMenuItem.ItemId) == null) + { + previousMenuItem.Dispose(); + previousMenuItems.RemoveAt(j); + } + } + } + foreach (var toolbarItem in previousToolBarItems) toolbarItem.PropertyChanged -= toolbarItemChanged; @@ -248,10 +261,7 @@ public static void UpdateMenuItems(this AToolbar toolbar, int toolBarItemCount = i; while (toolBarItemCount < previousMenuItems.Count) { - if (menu != null) - { - menu.RemoveItem(previousMenuItems[toolBarItemCount].ItemId); - } + menu?.RemoveItem(previousMenuItems[toolBarItemCount].ItemId); previousMenuItems[toolBarItemCount].Dispose(); previousMenuItems.RemoveAt(toolBarItemCount); } diff --git a/src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs b/src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs index 1ed410cd610b..b9eebb950ae5 100644 --- a/src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs +++ b/src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs @@ -93,8 +93,7 @@ public void Dispose() if (uiGestureRecognizer is null) continue; - if (PlatformView != null) - PlatformView.RemoveGestureRecognizer(uiGestureRecognizer); + PlatformView?.RemoveGestureRecognizer(uiGestureRecognizer); uiGestureRecognizer.ShouldReceiveTouch = null; uiGestureRecognizer.Dispose(); } @@ -699,10 +698,7 @@ _handler.VirtualView is View v && if (uiRecognizer is null) continue; - if (PlatformView != null) - { - PlatformView.RemoveGestureRecognizer(uiRecognizer); - } + PlatformView?.RemoveGestureRecognizer(uiRecognizer); if (TryGetTapGestureRecognizer(gestureRecognizer, out TapGestureRecognizer? tapGestureRecognizer) && tapGestureRecognizer != null) diff --git a/src/Controls/src/Core/Platform/Windows/FormsListView.cs b/src/Controls/src/Core/Platform/Windows/FormsListView.cs index 8183b6fd5272..a76f696b61a0 100644 --- a/src/Controls/src/Core/Platform/Windows/FormsListView.cs +++ b/src/Controls/src/Core/Platform/Windows/FormsListView.cs @@ -80,10 +80,7 @@ protected override void OnApplyTemplate() protected override global::Windows.Foundation.Size ArrangeOverride(global::Windows.Foundation.Size finalSize) { - if (_formsEmptyView != null) - { - _formsEmptyView.Layout(new Rect(0, 0, finalSize.Width, finalSize.Height)); - } + _formsEmptyView?.Layout(new Rect(0, 0, finalSize.Width, finalSize.Height)); return base.ArrangeOverride(finalSize); } diff --git a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 6701f5cb535b..d894eaee1c2c 100644 --- a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -249,6 +249,11 @@ static Microsoft.Maui.Controls.ViewExtensions.ScaleToAsync(this Microsoft.Maui.C static Microsoft.Maui.Controls.ViewExtensions.ScaleXToAsync(this Microsoft.Maui.Controls.VisualElement! view, double scale, uint length = 250, Microsoft.Maui.Easing? easing = null) -> System.Threading.Tasks.Task! static Microsoft.Maui.Controls.ViewExtensions.ScaleYToAsync(this Microsoft.Maui.Controls.VisualElement! view, double scale, uint length = 250, Microsoft.Maui.Easing? easing = null) -> System.Threading.Tasks.Task! static Microsoft.Maui.Controls.ViewExtensions.TranslateToAsync(this Microsoft.Maui.Controls.VisualElement! view, double x, double y, uint length = 250, Microsoft.Maui.Easing? easing = null) -> System.Threading.Tasks.Task! +virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellPageRendererTracker.RemoveSearchController(UIKit.UINavigationItem! navigationItem) -> void +*REMOVED*override Microsoft.Maui.Controls.Handlers.Items.StructuredItemsViewController.ViewWillLayoutSubviews() -> void +*REMOVED*~Microsoft.Maui.Controls.Handlers.Compatibility.ShellScrollViewTracker.ShellScrollViewTracker(Microsoft.Maui.IPlatformViewHandler renderer) -> void +virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellPageRendererTracker.UpdateSearchIsEnabled(UIKit.UISearchController! searchController) -> void +virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellPageRendererTracker.UpdateSearchVisibility(UIKit.UISearchController! searchController) -> void ~static readonly Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.Button.RippleColorProperty -> Microsoft.Maui.Controls.BindableProperty ~static readonly Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.ImageButton.RippleColorProperty -> Microsoft.Maui.Controls.BindableProperty ~static readonly Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.WebView.JavaScriptEnabledProperty -> Microsoft.Maui.Controls.BindableProperty @@ -271,9 +276,6 @@ virtual Microsoft.Maui.Controls.BindableProperty.CreateDefaultValueDelegate void ~virtual Microsoft.Maui.Controls.Handlers.Compatibility.NavigationRenderer.GetSecondaryToolbarMenuButtonImage() -> UIKit.UIImage ~virtual Microsoft.Maui.Controls.Internals.EvaluateJavaScriptDelegate.Invoke(string script) -> System.Threading.Tasks.Task -virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellPageRendererTracker.RemoveSearchController(UIKit.UINavigationItem! navigationItem) -> void -virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellPageRendererTracker.UpdateSearchIsEnabled(UIKit.UISearchController! searchController) -> void -virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellPageRendererTracker.UpdateSearchVisibility(UIKit.UISearchController! searchController) -> void ~virtual Microsoft.Maui.Controls.PropertyChangingEventHandler.Invoke(object sender, Microsoft.Maui.Controls.PropertyChangingEventArgs e) -> void ~virtual Microsoft.Maui.Controls.VisualElement.ComputeConstraintForView(Microsoft.Maui.Controls.View view) -> void *REMOVED*Microsoft.Maui.Controls.ClickedEventArgs diff --git a/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs b/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs index 5b02fb9ae307..86e57d9cb0e5 100644 --- a/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs +++ b/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs @@ -219,6 +219,17 @@ protected bool IsBackButtonVisible(IElementHandler handler) return false; } + protected void AssertTranslationMatches(global::Android.Views.View nativeView, double expectedTranslationX, double expectedTranslationY) + { + var context = nativeView?.Context ?? throw new InvalidOperationException("Context cannot be null."); + + var expectedXInPixels = context.ToPixels(expectedTranslationX); + Assert.Equal(expectedXInPixels, nativeView.TranslationX, precision: 1); + + var expectedYInPixels = context.ToPixels(expectedTranslationY); + Assert.Equal(expectedYInPixels, nativeView.TranslationY, precision: 1); + } + class WindowTestFragment : Fragment { TaskCompletionSource _taskCompletionSource = new TaskCompletionSource(); diff --git a/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs index 06b33225cf2a..1a640a0253b5 100644 --- a/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs @@ -126,5 +126,26 @@ Task GetPlatformIsVisible(ShapeViewHandler boxViewViewHandler) return nativeView.Visibility == global::Android.Views.ViewStates.Visible; }); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a BoxView should match with native Translation")] + public async Task BoxViewTranslationConsistent() + { + var boxView = new BoxView() + { + HeightRequest = 100, + WidthRequest = 200, + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(boxView); + var nativeView = GetNativeBoxView(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, boxView.TranslationX, boxView.TranslationY); + }); + } } } \ No newline at end of file diff --git a/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs index 982a4eeecc30..5c4a192c13de 100644 --- a/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs @@ -218,5 +218,25 @@ public async Task ButtonRippleColorPlatformSpecific() } } } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a Button should match with native Translation")] + public async Task ButtonTranslationConsistent() + { + var button = new Button() + { + Text = "Button Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(button); + var nativeView = GetPlatformButton(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, button.TranslationX, button.TranslationY); + }); + } } } diff --git a/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs index ca7f1b6efa57..80a23e6ee74c 100644 --- a/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs @@ -122,5 +122,24 @@ Task GetPlatformIsVisible(CheckBoxHandler checkBoxHandler) return nativeView.Visibility == global::Android.Views.ViewStates.Visible; }); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a CheckBox should match with native Translation")] + public async Task CheckBoxTranslationConsistent() + { + var checkBox = new CheckBox() + { + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(checkBox); + var nativeView = GetNativeCheckBox(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, checkBox.TranslationX, checkBox.TranslationY); + }); + } } } \ No newline at end of file diff --git a/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs index abe6858f8861..252382176454 100644 --- a/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs @@ -170,5 +170,25 @@ await InvokeOnMainThreadAsync(() => Assert.Equal(expectedValue, isEnabled); }); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a Editor should match with native Translation")] + public async Task EditorTranslationConsistent() + { + var editor = new Editor() + { + Text = "Editor Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(editor); + var nativeView = GetPlatformControl(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, editor.TranslationX, editor.TranslationY); + }); + } } } diff --git a/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs index 899ed18871e2..e5fb5a30c6bc 100644 --- a/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs @@ -164,5 +164,25 @@ public async Task RotationConsistent() var platformRotation = await InvokeOnMainThreadAsync(() => platformEntry.Rotation); Assert.Equal(expected, platformRotation); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a Entry should match with native Translation")] + public async Task EntryTranslationConsistent() + { + var entry = new Entry() + { + Text = "Entry Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(entry); + var nativeView = GetPlatformControl(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, entry.TranslationX, entry.TranslationY); + }); + } } } diff --git a/src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs index 3803cb506aa7..0b1bf0c4d195 100644 --- a/src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs @@ -182,6 +182,26 @@ await InvokeOnMainThreadAsync(() => }); } + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a Label should match with native Translation")] + public async Task LabelTranslationConsistent() + { + var label = new Label() + { + Text = "Label Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(label); + var nativeView = GetPlatformLabel(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, label.TranslationX, label.TranslationY); + }); + } + TextView GetPlatformLabel(LabelHandler labelHandler) => labelHandler.PlatformView; diff --git a/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs index 9e03820c5a9d..81d54b2f6845 100644 --- a/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs @@ -145,5 +145,25 @@ Task GetPlatformIsVisible(SearchBarHandler searchBarHandler) return nativeView.Visibility == global::Android.Views.ViewStates.Visible; }); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a SearchBar should match with native Translation")] + public async Task SearchBarTranslationConsistent() + { + var searchBar = new SearchBar() + { + Text = "SearchBar Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(searchBar); + var nativeView = GetPlatformControl(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, searchBar.TranslationX, searchBar.TranslationY); + }); + } } } diff --git a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs index dda0fcd716ac..79dca3293094 100644 --- a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs @@ -190,6 +190,25 @@ await InvokeOnMainThreadAsync(() => }); } + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a SwipeView should match with native Translation")] + public async Task SwipeViewTranslationConsistent() + { + var swipeView = new SwipeView() + { + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(swipeView); + var nativeView = GetPlatformControl(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, swipeView.TranslationX, swipeView.TranslationY); + }); + } + [Fact] [Description("The IsEnabled of a SwipeView should match with native IsEnabled")] public async Task VerifySwipeViewIsEnabledProperty() diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ClearButtonVisiblityButton_TextEmpty.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ClearButtonVisiblityButton_TextEmpty.png new file mode 100644 index 000000000000..16eaad2b1aac Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ClearButtonVisiblityButton_TextEmpty.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ClearButtonVisiblityButton_TextPresent.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ClearButtonVisiblityButton_TextPresent.png new file mode 100644 index 000000000000..c33099e75103 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ClearButtonVisiblityButton_TextPresent.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ControlsShouldRemainVisibleWithWebViewWhenHardwareAccelerationIsDisabled.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ControlsShouldRemainVisibleWithWebViewWhenHardwareAccelerationIsDisabled.png new file mode 100644 index 000000000000..6024d49bfca3 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ControlsShouldRemainVisibleWithWebViewWhenHardwareAccelerationIsDisabled.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/PlaceholderWithClearButtonVisible.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/PlaceholderWithClearButtonVisible.png new file mode 100644 index 000000000000..b7f1aa9f3db6 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/PlaceholderWithClearButtonVisible.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ChangeFlowDirection_RTL_VerifyLabel.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ChangeFlowDirection_RTL_VerifyLabel.png new file mode 100644 index 000000000000..eabaebcfa9aa Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ChangeFlowDirection_RTL_VerifyLabel.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ProgressToMethod_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ProgressToMethod_VerifyVisualState.png new file mode 100644 index 000000000000..9a9dca36f9ce Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ProgressToMethod_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetIsVisibleFalse_VerifyLabel.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetIsVisibleFalse_VerifyLabel.png new file mode 100644 index 000000000000..963ab68d353b Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetIsVisibleFalse_VerifyLabel.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressColorAndBackgroundColor_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressColorAndBackgroundColor_VerifyVisualState.png new file mode 100644 index 000000000000..20a7224b79a3 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressColorAndBackgroundColor_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressNegativeValue.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressNegativeValue.png new file mode 100644 index 000000000000..bb6ce2ad7e95 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressNegativeValue.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressOutOfRange.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressOutOfRange.png new file mode 100644 index 000000000000..56a926d8c3d6 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_SetProgressOutOfRange.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ToggleShadow_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ToggleShadow_VerifyVisualState.png new file mode 100644 index 000000000000..569b095a27cf Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ProgressBar_ToggleShadow_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/SwipeViewShouldNotClose.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/SwipeViewShouldNotClose.png new file mode 100644 index 000000000000..03739474c7f3 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/SwipeViewShouldNotClose.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_Click_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_Click_VerifyVisualState.png new file mode 100644 index 000000000000..a75b42a9c941 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_Click_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_InitialState_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_InitialState_VerifyVisualState.png new file mode 100644 index 000000000000..cb3bcc5a143c Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_InitialState_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetFlowDirectionAndToggled_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetFlowDirectionAndToggled_VerifyVisualState.png new file mode 100644 index 000000000000..a468b0986dd7 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetFlowDirectionAndToggled_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetOnColorAndThumbColor_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetOnColorAndThumbColor_VerifyVisualState.png new file mode 100644 index 000000000000..c6f361a5f79b Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetOnColorAndThumbColor_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetThumbColorAndOnColor_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetThumbColorAndOnColor_VerifyVisualState.png new file mode 100644 index 000000000000..5a6101d51eb5 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetThumbColorAndOnColor_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetToggledAndOnColor_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetToggledAndOnColor_VerifyVisualState.png new file mode 100644 index 000000000000..95872ebc1192 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Switch_SetToggledAndOnColor_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyCharacterSpacingWhenFontFamily.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyCharacterSpacingWhenFontFamily.png new file mode 100644 index 000000000000..2335703dd51c Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyCharacterSpacingWhenFontFamily.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyCharacterSpacingWhenMaxLengthSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyCharacterSpacingWhenMaxLengthSet.png new file mode 100644 index 000000000000..29c360172ba6 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyCharacterSpacingWhenMaxLengthSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenIsPasswordTrueOrFalse.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenIsPasswordTrueOrFalse.png new file mode 100644 index 000000000000..4cd7376f32cc Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenIsPasswordTrueOrFalse.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenTextAlignedHorizontally.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenTextAlignedHorizontally.png new file mode 100644 index 000000000000..6d0661ce5d68 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenTextAlignedHorizontally.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenTextAlignedVertically.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenTextAlignedVertically.png new file mode 100644 index 000000000000..cda25852ab2a Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearButtonVisiblityWhenTextAlignedVertically.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearVisiblityButtonWhenTextColorChanged.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearVisiblityButtonWhenTextColorChanged.png new file mode 100644 index 000000000000..432bdd463b72 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyClearVisiblityButtonWhenTextColorChanged.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenFlowDirectionSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenFlowDirectionSet.png new file mode 100644 index 000000000000..c4145fd469c2 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenFlowDirectionSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenPlaceholderColorSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenPlaceholderColorSet.png new file mode 100644 index 000000000000..59d01ca1beab Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenPlaceholderColorSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenPlaceholderTextSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenPlaceholderTextSet.png new file mode 100644 index 000000000000..af0b1a2a64ce Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntryControlWhenPlaceholderTextSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntry_WithShadow.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntry_WithShadow.png new file mode 100644 index 000000000000..37f2d297e0a2 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyEntry_WithShadow.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyFontImageWithFontColorGreen.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyFontImageWithFontColorGreen.png new file mode 100644 index 000000000000..6e07c2ca3b90 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyFontImageWithFontColorGreen.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyFontImageWithFontSize.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyFontImageWithFontSize.png new file mode 100644 index 000000000000..ddf86446ef9b Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyFontImageWithFontSize.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyHorizontalTextAlignmentBasedOnCharacterSpacing.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyHorizontalTextAlignmentBasedOnCharacterSpacing.png new file mode 100644 index 000000000000..67afb8aa613d Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyHorizontalTextAlignmentBasedOnCharacterSpacing.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyHorizontalTextAlignmentWhenVerticalTextAlignmentSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyHorizontalTextAlignmentWhenVerticalTextAlignmentSet.png new file mode 100644 index 000000000000..694075902c73 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyHorizontalTextAlignmentWhenVerticalTextAlignmentSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromFile.png new file mode 100644 index 000000000000..05f2610aa8a1 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..c8973180c6e1 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromStream.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromStream.png new file mode 100644 index 000000000000..2ce7510e5eeb Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromStream.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromUri.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromUri.png new file mode 100644 index 000000000000..f06f486c8257 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFillWithImageSourceFromUri.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromFile.png new file mode 100644 index 000000000000..c6635bc47ffa Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..133f59a9e0c2 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromStream.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromStream.png new file mode 100644 index 000000000000..f30eadc01c60 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromStream.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromUri.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromUri.png new file mode 100644 index 000000000000..97bbca1c8d99 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_AspectFitWithImageSourceFromUri.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromFile.png new file mode 100644 index 000000000000..e38b5aac179d Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..07c2db165115 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromStream.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromStream.png new file mode 100644 index 000000000000..2983b6be6b55 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromStream.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromUri.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromUri.png new file mode 100644 index 000000000000..ea4f90b9c5ad Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_CenterWithImageSourceFromUri.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromFile.png new file mode 100644 index 000000000000..264d5e691848 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..d96296e22793 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromStream.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromStream.png new file mode 100644 index 000000000000..5815e8c9c580 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromStream.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromUri.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromUri.png new file mode 100644 index 000000000000..bf551303659e Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageAspect_FillWithImageSourceFromUri.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFillWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFillWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..d1414c3fc572 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFillWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFillWithImageSourceFromStream.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFillWithImageSourceFromStream.png new file mode 100644 index 000000000000..f5af2cd354fe Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFillWithImageSourceFromStream.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromFile.png new file mode 100644 index 000000000000..58a53328da76 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..d763425a37db Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromStream.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromStream.png new file mode 100644 index 000000000000..7757b574deb8 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromStream.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromUri.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromUri.png new file mode 100644 index 000000000000..a2ab9605f4a2 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_AspectFitWithImageSourceFromUri.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromFile.png new file mode 100644 index 000000000000..0059f648eaf0 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..64a49374fa21 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromStream.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromStream.png new file mode 100644 index 000000000000..52021ad91856 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_CenterWithImageSourceFromStream.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromFile.png new file mode 100644 index 000000000000..e22f0e5e7036 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..324f72f2ce91 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromStream.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromStream.png new file mode 100644 index 000000000000..cf0ebaba1935 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromStream.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromUri.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromUri.png new file mode 100644 index 000000000000..1347ef87d941 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonAspect_FillWithImageSourceFromUri.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonFlowDirectionRTL.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonFlowDirectionRTL.png new file mode 100644 index 000000000000..5237a98ab6cd Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonFlowDirectionRTL.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderColor.png new file mode 100644 index 000000000000..47603f89feab Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderColor.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderColorAndWidth.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderColorAndWidth.png new file mode 100644 index 000000000000..5f56c84b7692 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderColorAndWidth.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderWidth.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderWidth.png new file mode 100644 index 000000000000..24b98d547d69 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderWidth.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderWidthAndCornerRadius.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderWidthAndCornerRadius.png new file mode 100644 index 000000000000..8e57578ffb65 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithBorderWidthAndCornerRadius.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithCornerRadius.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithCornerRadius.png new file mode 100644 index 000000000000..bd2922d855cd Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithCornerRadius.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithPadding.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithPadding.png new file mode 100644 index 000000000000..ddb378ce565d Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithPadding.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithShadow.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithShadow.png new file mode 100644 index 000000000000..3d88ddc6e9d3 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageButtonWithShadow.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageFlowDirectionRTL.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageFlowDirectionRTL.png new file mode 100644 index 000000000000..f70318ff5deb Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageFlowDirectionRTL.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageWithShadow.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageWithShadow.png new file mode 100644 index 000000000000..db24b17cb3eb Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyImageWithShadow.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnCharacterSpacing.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnCharacterSpacing.png new file mode 100644 index 000000000000..cc0cac4a995b Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnCharacterSpacing.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnHorizontalTextAlignment.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnHorizontalTextAlignment.png new file mode 100644 index 000000000000..bf5970fdbd26 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnHorizontalTextAlignment.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnVerticalTextAlignment.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnVerticalTextAlignment.png new file mode 100644 index 000000000000..7d64cf56b103 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordBasedOnVerticalTextAlignment.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordWhenFontSizeSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordWhenFontSizeSet.png new file mode 100644 index 000000000000..a60efe8eaae8 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordWhenFontSizeSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordWhenMaxLenghtSetValue.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordWhenMaxLenghtSetValue.png new file mode 100644 index 000000000000..15a095fb2abb Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyIsPasswordWhenMaxLenghtSetValue.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWhenFlowDirectionSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWhenFlowDirectionSet.png new file mode 100644 index 000000000000..b4d7c7dbe80b Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWhenFlowDirectionSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithCharacterSpacing.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithCharacterSpacing.png new file mode 100644 index 000000000000..724c326fbc03 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithCharacterSpacing.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontAttributes.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontAttributes.png new file mode 100644 index 000000000000..1af1e8ad0685 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontAttributes.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontFamily.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontFamily.png new file mode 100644 index 000000000000..f6ade1047e66 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontFamily.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontSize.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontSize.png new file mode 100644 index 000000000000..3732ab052bfd Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithFontSize.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithHorizontalAlignment.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithHorizontalAlignment.png new file mode 100644 index 000000000000..3a670917e8e4 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithHorizontalAlignment.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithPasswordTrue.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithPasswordTrue.png new file mode 100644 index 000000000000..b6b45bbb8f39 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithPasswordTrue.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithShadow.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithShadow.png new file mode 100644 index 000000000000..38d514355fbe Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithShadow.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithVerticalAlignment.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithVerticalAlignment.png new file mode 100644 index 000000000000..5eddbf395e65 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyPlaceholderWithVerticalAlignment.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenAlingnedHorizontally.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenAlingnedHorizontally.png new file mode 100644 index 000000000000..34d048b358dc Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenAlingnedHorizontally.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenAlingnedVertically.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenAlingnedVertically.png new file mode 100644 index 000000000000..03b60a6da528 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenAlingnedVertically.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenCharacterSpacingSetValues.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenCharacterSpacingSetValues.png new file mode 100644 index 000000000000..848f172c35d3 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenCharacterSpacingSetValues.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenClearButtonVisibleSetNever.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenClearButtonVisibleSetNever.png new file mode 100644 index 000000000000..03cd241b9ec8 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenClearButtonVisibleSetNever.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontAttributesSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontAttributesSet.png new file mode 100644 index 000000000000..7cbf5f8f8ce1 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontAttributesSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontFamilySetValue.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontFamilySetValue.png new file mode 100644 index 000000000000..589548813bb3 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontFamilySetValue.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontSizeSetCorrectly.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontSizeSetCorrectly.png new file mode 100644 index 000000000000..516de1791f27 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenFontSizeSetCorrectly.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenIsPasswordTrueOrFalse.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenIsPasswordTrueOrFalse.png new file mode 100644 index 000000000000..1d528daf5870 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenIsPasswordTrueOrFalse.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenKeyboardTypeSet.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenKeyboardTypeSet.png new file mode 100644 index 000000000000..2c59ee8bc528 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenKeyboardTypeSet.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenTextColorSetCorrectly.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenTextColorSetCorrectly.png new file mode 100644 index 000000000000..335e441cac49 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyTextWhenTextColorSetCorrectly.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyVerticalTextAlignmentBasedOnCharacterSpacing.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyVerticalTextAlignmentBasedOnCharacterSpacing.png new file mode 100644 index 000000000000..7a5d6239288b Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyVerticalTextAlignmentBasedOnCharacterSpacing.png differ diff --git a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs index ed958186d3fb..99d9ae8bab68 100644 --- a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs +++ b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs @@ -63,11 +63,12 @@ public override string ToString() new GalleryPageFactory(() => new KeyboardScrollingGridGallery(), "Keyboard Scrolling Gallery - Grid with Star Row"), new GalleryPageFactory(() => new KeyboardScrollingNonScrollingPageLargeTitlesGallery(), "Keyboard Scrolling Gallery - NonScrolling Page / Large Titles"), new GalleryPageFactory(() => new KeyboardScrollingNonScrollingPageSmallTitlesGallery(), "Keyboard Scrolling Gallery - NonScrolling Page / Small Titles"), - new GalleryPageFactory(() => new KeyboardScrollingScrollingPageLargeTitlesGallery(), "Keyboard Scrolling Gallery - Scrolling Page / Large Titles"), + new GalleryPageFactory(() => new KeyboardScrollingScrollingPageLargeTitlesGallery(), "Keyboard Scrolling Gallery - Scrolling Page / Large Titles"), new GalleryPageFactory(() => new KeyboardScrollingScrollingPageSmallTitlesGallery(), "Keyboard Scrolling Gallery - Scrolling Page / Small Titles"), new GalleryPageFactory(() => new LabelCoreGalleryPage(), "Label Gallery"), new GalleryPageFactory(() => new ListViewCoreGalleryPage(), "ListView Gallery"), new GalleryPageFactory(() => new PickerCoreGalleryPage(), "Picker Gallery"), + new GalleryPageFactory(() => new ProgressBarControlPage(), "ProgressBar Feature Matrix"), new GalleryPageFactory(() => new ProgressBarCoreGalleryPage(), "Progress Bar Gallery"), new GalleryPageFactory(() => new RadioButtonControlPage(), "RadioButton Feature Matrix"), new GalleryPageFactory(() => new RadioButtonCoreGalleryPage(), "RadioButton Gallery"), @@ -77,6 +78,7 @@ public override string ToString() new GalleryPageFactory(() => new SliderCoreGalleryPage(), "Slider Gallery"), new GalleryPageFactory(() => new StepperControlPage(), "Stepper Feature Matrix"), new GalleryPageFactory(() => new StepperCoreGalleryPage(), "Stepper Gallery"), + new GalleryPageFactory(() => new SwitchControlPage(), "Switch Feature Matrix"), new GalleryPageFactory(() => new SwitchCoreGalleryPage(), "Switch Gallery"), new GalleryPageFactory(() => new SwipeViewCoreGalleryPage(), "SwipeView Gallery"), new GalleryPageFactory(() => new TimePickerCoreGalleryPage(), "Time Picker Gallery"), @@ -86,6 +88,9 @@ public override string ToString() new GalleryPageFactory(() => new CollectionViewFeaturePage(), "CollectionView Feature Matrix"), new GalleryPageFactory(() => new LabelControlPage(), "Label Feature Matrix"), new GalleryPageFactory(() => new CarouselViewFeaturePage(), "CarouselView Feature Matrix"), + new GalleryPageFactory(() => new EntryControlPage(), "Entry Feature Matrix"), + new GalleryPageFactory(() => new ImageControlPage(), "Image Feature Matrix"), + new GalleryPageFactory(() => new ImageButtonControlPage(), "ImageButton Feature Matrix"), new GalleryPageFactory(() => new BoxViewControlPage(), "BoxView Feature Matrix"), }; diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryControlPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryControlPage.xaml new file mode 100644 index 000000000000..ca14466bb74a --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryControlPage.xaml @@ -0,0 +1,115 @@ + + +