diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColor.png
new file mode 100644
index 000000000000..2c37785439a2
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndForegroundColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndForegroundColor.png
new file mode 100644
index 000000000000..2cd9330ae71c
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndForegroundColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndTitleColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndTitleColor.png
new file mode 100644
index 000000000000..005f8ed7fb7d
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndTitleColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndUnselectedColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndUnselectedColor.png
new file mode 100644
index 000000000000..5d032676ae7b
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_BackgroundColorAndUnselectedColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColor.png
new file mode 100644
index 000000000000..8204d919abe2
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColorAndTitleColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColorAndTitleColor.png
new file mode 100644
index 000000000000..362b54707dda
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColorAndTitleColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColorAndUnselectedColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColorAndUnselectedColor.png
new file mode 100644
index 000000000000..767d9203c16d
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ForegroundColorAndUnselectedColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_IsVisibleFalse.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_IsVisibleFalse.png
new file mode 100644
index 000000000000..7c5974150ea5
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_IsVisibleFalse.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_IsVisibleTrue.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_IsVisibleTrue.png
new file mode 100644
index 000000000000..5cb3d447f5f0
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_IsVisibleTrue.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_NavBarVisibilityHide.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_NavBarVisibilityHide.png
new file mode 100644
index 000000000000..f735c1ccfe61
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_NavBarVisibilityHide.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_NavBarVisibilityShow.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_NavBarVisibilityShow.png
new file mode 100644
index 000000000000..2af63e34e944
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_NavBarVisibilityShow.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeAnimated.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeAnimated.png
new file mode 100644
index 000000000000..068bc0a1fbd3
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeAnimated.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModal.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModal.png
new file mode 100644
index 000000000000..62f961cd4ada
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModal.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModalAnimated.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModalAnimated.png
new file mode 100644
index 000000000000..9dbb3e471655
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModalAnimated.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModalNotAnimated.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModalNotAnimated.png
new file mode 100644
index 000000000000..f94a4170ec09
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeModalNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeNotAnimated.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeNotAnimated.png
new file mode 100644
index 000000000000..4f376fa262b3
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_PresentationModeNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleView.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleView.png
new file mode 100644
index 000000000000..633c49ca9fc3
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleView.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleViewHidden.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleViewHidden.png
new file mode 100644
index 000000000000..bbe3c39b1d79
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleViewHidden.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleViewWithBackgroundColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleViewWithBackgroundColor.png
new file mode 100644
index 000000000000..898e3a789afc
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_ShowTitleViewWithBackgroundColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_TitleColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_TitleColor.png
new file mode 100644
index 000000000000..36fa0254f586
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_TitleColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_UnselectedColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_UnselectedColor.png
new file mode 100644
index 000000000000..84cb716601f8
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_UnselectedColor.png differ
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_VerifyForegroundColorResetForBackButton.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_VerifyForegroundColorResetForBackButton.png
new file mode 100644
index 000000000000..8e59379beed6
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_VerifyForegroundColorResetForBackButton.png differ
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellFeaturePage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellFeaturePage.xaml
index 0e7b6d3c220e..2f631177d865 100644
--- a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellFeaturePage.xaml
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellFeaturePage.xaml
@@ -17,5 +17,10 @@
HorizontalOptions="Center"
AutomationId="ShellTabbedButton"
WidthRequest="400"/>
+
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellFeaturePage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellFeaturePage.xaml.cs
index 2086a1b9ada1..25e106d0773b 100644
--- a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellFeaturePage.xaml.cs
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellFeaturePage.xaml.cs
@@ -5,9 +5,8 @@ namespace Maui.Controls.Sample;
public class ShellFeaturePage : NavigationPage
{
- public ShellFeaturePage()
+ public ShellFeaturePage() : base(new ShellFeatureMainPage())
{
- PushAsync(new ShellFeatureMainPage());
}
}
@@ -27,4 +26,9 @@ private void OnShellTabbedButtonClicked(object sender, EventArgs e)
{
Application.Current.MainPage = new ShellTabbedControlPage();
}
+
+ private void OnShellPageButtonClicked(object sender, EventArgs e)
+ {
+ this.Window.Page = new ShellControlPage();
+ }
}
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellControlPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellControlPage.xaml
new file mode 100644
index 000000000000..a9f877131b20
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellControlPage.xaml
@@ -0,0 +1,220 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellControlPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellControlPage.xaml.cs
new file mode 100644
index 000000000000..76d9fab2bb31
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellControlPage.xaml.cs
@@ -0,0 +1,203 @@
+using Microsoft.Maui.Controls;
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Maui.Controls.Sample;
+
+public partial class ShellControlPage : Shell
+{
+ private ShellViewModel _viewModel;
+ public ShellContent HomePage => homePage;
+ private const string NotAnimatedRoute = "shell-feature/notanimated";
+ private const string AnimatedRoute = "shell-feature/animated";
+ private const string ModalRoute = "shell-feature/modal";
+ private const string ModalAnimatedRoute = "shell-feature/modalanimated";
+ private const string ModalNotAnimatedRoute = "shell-feature/modalnotanimated";
+
+
+ public ShellControlPage()
+ {
+ InitializeComponent();
+ _viewModel = new ShellViewModel();
+ BindingContext = _viewModel;
+ Routing.RegisterRoute(NotAnimatedRoute, typeof(NotAnimatedPresentationPage));
+ Routing.RegisterRoute(AnimatedRoute, typeof(AnimatedPresentationPage));
+ Routing.RegisterRoute(ModalRoute, typeof(ModalPresentationPage));
+ Routing.RegisterRoute(ModalAnimatedRoute, typeof(ModalAnimatedPresentationPage));
+ Routing.RegisterRoute(ModalNotAnimatedRoute, typeof(ModalNotAnimatedPresentationPage));
+ }
+ async void NavigateToOptionsPage_Clicked(object sender, EventArgs e)
+ {
+ BindingContext = _viewModel = new ShellViewModel();
+ await Navigation.PushAsync(new ShellOptionsPage(_viewModel));
+ }
+ void OnNavBarAnimTrueClicked(object sender, EventArgs e)
+ {
+ Shell.SetNavBarVisibilityAnimationEnabled(this, true);
+ }
+ void OnNavBarAnimFalseClicked(object sender, EventArgs e)
+ {
+ Shell.SetNavBarVisibilityAnimationEnabled(this, false);
+ }
+ void OnNavBarVisibleClicked(object sender, EventArgs e)
+ {
+ Shell.SetNavBarIsVisible(this, true);
+ }
+ void OnNavBarHiddenClicked(object sender, EventArgs e)
+ {
+ Shell.SetNavBarIsVisible(this, false);
+ }
+ void OnNavBarHasShadowTrueClicked(object sender, EventArgs e)
+ {
+ Shell.SetNavBarHasShadow(this, true);
+ }
+ void OnNavBarHasShadowFalseClicked(object sender, EventArgs e)
+ {
+ Shell.SetNavBarHasShadow(this, false);
+ }
+ private async void OnGoToNotAnimated(object sender, EventArgs e)
+ => await Shell.Current.GoToAsync(NotAnimatedRoute);
+
+ private async void OnGoToAnimated(object sender, EventArgs e)
+ => await Shell.Current.GoToAsync(AnimatedRoute);
+
+ private async void OnGoToModal(object sender, EventArgs e)
+ => await Shell.Current.GoToAsync(ModalRoute);
+
+ private async void OnGoToModalAnimated(object sender, EventArgs e)
+ => await Shell.Current.GoToAsync(ModalAnimatedRoute);
+
+ private async void OnGoToModalNotAnimated(object sender, EventArgs e)
+ => await Shell.Current.GoToAsync(ModalNotAnimatedRoute);
+ private async void OnGoToHomeClicked(object sender, EventArgs e)
+ {
+ await Shell.Current.GoToAsync("//home");
+ }
+ private async void OnGoBackClicked(object sender, EventArgs e)
+ {
+ await Shell.Current.GoToAsync("..");
+ }
+ private void SetTitleView()
+ {
+ var grid = new Grid
+ {
+ ColumnDefinitions =
+ {
+ new ColumnDefinition { Width = GridLength.Auto },
+ new ColumnDefinition { Width = GridLength.Auto }
+ },
+ VerticalOptions = LayoutOptions.Center
+ };
+ var image = new Image
+ {
+ Source = "dotnet_bot.png",
+ WidthRequest = 28,
+ HeightRequest = 28,
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Center
+ };
+
+ var label = new Label
+ {
+ Text = "Shell TitleView",
+ Margin = new Thickness(30, 0, 0, 0),
+ VerticalOptions = LayoutOptions.Center,
+ FontAttributes = FontAttributes.Bold,
+ TextColor = Colors.Black
+ };
+
+ Grid.SetColumn(label, 1);
+
+ grid.Add(image);
+ grid.Add(label);
+
+ Shell.SetTitleView(this, grid);
+ }
+ private void RemoveTitleView()
+ {
+ Shell.SetTitleView(this, null);
+ }
+ private void OnShowTitleViewClicked(object sender, EventArgs e)
+ {
+ SetTitleView();
+ }
+ private void OnHideTitleViewClicked(object sender, EventArgs e)
+ {
+ RemoveTitleView();
+ }
+
+ private abstract class PresentationModePage : ContentPage
+ {
+ protected PresentationModePage(string title, PresentationMode mode)
+ {
+ Title = title;
+ BackgroundColor = Colors.White;
+ Shell.SetPresentationMode(this, mode);
+
+ var backButton = new Button
+ {
+ Text = "Go Back",
+ AutomationId = "GoBackButton",
+ BackgroundColor = Color.FromArgb("F5F5F5"),
+ TextColor = Colors.Black
+ };
+ backButton.Clicked += async (_, __) => await Shell.Current.GoToAsync("..");
+
+ Content = new VerticalStackLayout
+ {
+ Padding = 20,
+ Spacing = 20,
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.Center,
+ Children =
+ {
+ new Label { Text = title, HorizontalOptions = LayoutOptions.Center },
+ backButton
+ }
+ };
+ }
+ }
+
+ private sealed class NotAnimatedPresentationPage : PresentationModePage
+ {
+ public NotAnimatedPresentationPage()
+ : base("NotAnimated Page", PresentationMode.NotAnimated)
+ {
+ }
+ }
+
+ private sealed class AnimatedPresentationPage : PresentationModePage
+ {
+ public AnimatedPresentationPage()
+ : base("Animated Page", PresentationMode.Animated)
+ {
+ }
+ }
+
+ private sealed class ModalPresentationPage : PresentationModePage
+ {
+ public ModalPresentationPage()
+ : base("Modal Page", PresentationMode.Modal)
+ {
+ }
+ }
+
+ private sealed class ModalAnimatedPresentationPage : PresentationModePage
+ {
+ public ModalAnimatedPresentationPage()
+ : base("ModalAnimated Page", PresentationMode.ModalAnimated)
+ {
+ }
+ }
+
+ private sealed class ModalNotAnimatedPresentationPage : PresentationModePage
+ {
+ public ModalNotAnimatedPresentationPage()
+ : base("ModalNotAnimated Page", PresentationMode.ModalNotAnimated)
+ {
+ }
+ }
+
+}
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellOptionsPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellOptionsPage.xaml
new file mode 100644
index 000000000000..bb9b14342d4d
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellOptionsPage.xaml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellOptionsPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellOptionsPage.xaml.cs
new file mode 100644
index 000000000000..b81921abefea
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellPage/ShellOptionsPage.xaml.cs
@@ -0,0 +1,122 @@
+using Microsoft.Maui.Controls;
+using Microsoft.Maui.Graphics;
+using System;
+
+namespace Maui.Controls.Sample
+{
+ public partial class ShellOptionsPage : ContentPage
+ {
+ private readonly ShellViewModel _viewModel;
+
+ public ShellOptionsPage(ShellViewModel viewModel)
+ {
+ InitializeComponent();
+ _viewModel = viewModel;
+ BindingContext = _viewModel;
+ }
+
+ private async void OnApplyClicked(object sender, EventArgs e)
+ {
+ await Navigation.PopAsync();
+ }
+
+ // BackgroundColor
+ void OnBackgroundColorClicked(object sender, EventArgs e)
+ {
+ if (sender is Button button)
+ {
+ _viewModel.BackgroundColor = button.Text switch
+ {
+ "SkyBlue" => Colors.SkyBlue,
+ "LightGreen" => Colors.LightGreen,
+ "White" => Colors.White,
+ _ => _viewModel.BackgroundColor
+ };
+ }
+ }
+
+ // ForegroundColor
+ void OnForegroundColorClicked(object sender, EventArgs e)
+ {
+ if (sender is Button button)
+ {
+ _viewModel.ForegroundColor = button.Text switch
+ {
+ "Brown" => Colors.Brown,
+ "Magenta" => Colors.Magenta,
+ "Purple" => Colors.Purple,
+ _ => _viewModel.ForegroundColor
+ };
+ }
+ }
+
+ // TitleColor
+ void OnTitleColorClicked(object sender, EventArgs e)
+ {
+ if (sender is Button button)
+ {
+ _viewModel.TitleColor = button.Text switch
+ {
+ "Red" => Colors.Red,
+ "Green" => Colors.Green,
+ "Navy" => Colors.Navy,
+ _ => _viewModel.TitleColor
+ };
+ }
+ }
+
+ // DisabledColor
+ void OnDisabledColorClicked(object sender, EventArgs e)
+ {
+ if (sender is Button button)
+ {
+ _viewModel.DisabledColor = button.Text switch
+ {
+ "Gold" => Colors.Gold,
+ "Violet" => Colors.Violet,
+ "Silver" => Colors.Silver,
+ _ => _viewModel.DisabledColor
+ };
+ }
+ }
+
+ // UnselectedColor
+ void OnUnselectedColorClicked(object sender, EventArgs e)
+ {
+ if (sender is Button button)
+ {
+ _viewModel.UnselectedColor = button.Text switch
+ {
+ "Maroon" => Colors.Maroon,
+ "Blue" => Colors.Blue,
+ "Indigo" => Colors.Indigo,
+ _ => _viewModel.UnselectedColor
+ };
+ }
+ }
+ private void OnIsEnabledChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (sender is RadioButton radioButton && e.Value)
+ {
+ _viewModel.IsEnabled = radioButton.Content.ToString() == "True";
+ }
+ }
+
+ private void OnIsVisibleChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (sender is RadioButton radioButton && e.Value)
+ {
+ _viewModel.IsVisible = radioButton.Content.ToString() == "True";
+ }
+ }
+
+ private void OnFlowDirectionChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (sender is RadioButton radioButton && e.Value)
+ {
+ _viewModel.FlowDirection = radioButton.Content?.ToString() == "LTR" ? FlowDirection.LeftToRight : FlowDirection.RightToLeft;
+ }
+ }
+
+ }
+}
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellViewModel.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellViewModel.cs
index 212040a7af09..28c5b0f1ee16 100644
--- a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellViewModel.cs
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellViewModel.cs
@@ -39,6 +39,15 @@ public class ShellViewModel : INotifyPropertyChanged
private bool _tabBarIsVisible = true;
private bool _isEnabled = true;
private bool _isVisible = true;
+ private Color _backgroundColor;
+ private Color _foregroundColor;
+ private Color _titleColor;
+ private Color _disabledColor;
+ private Color _unselectedColor;
+ private bool _navBarVisible = true;
+ private bool _navBarHasShadow = true;
+ private bool _navBarVisibilityAnimationEnabled = true;
+ private PresentationMode _presentationMode = PresentationMode.Animated;
public FlyoutDisplayOptions FlyoutDisplayOptions
{
@@ -289,7 +298,62 @@ public ShellViewModel()
return label;
});
}
+
+ public Color BackgroundColor
+ {
+ get => _backgroundColor;
+ set { _backgroundColor = value; OnPropertyChanged(); }
+ }
+
+ public Color ForegroundColor
+ {
+ get => _foregroundColor;
+ set { _foregroundColor = value; OnPropertyChanged(); }
+ }
+
+ public Color TitleColor
+ {
+ get => _titleColor;
+ set { _titleColor = value; OnPropertyChanged(); }
+ }
+
+ public Color DisabledColor
+ {
+ get => _disabledColor;
+ set { _disabledColor = value; OnPropertyChanged(); }
+ }
+
+ public Color UnselectedColor
+ {
+ get => _unselectedColor;
+ set { _unselectedColor = value; OnPropertyChanged(); }
+ }
+
+ public bool NavBarIsVisible
+ {
+ get => _navBarVisible;
+ set { _navBarVisible = value; OnPropertyChanged(); }
+ }
+
+ public bool NavBarHasShadow
+ {
+ get => _navBarHasShadow;
+ set { _navBarHasShadow = value; OnPropertyChanged(); }
+ }
+
+ public bool NavBarVisibilityAnimationEnabled
+ {
+ get => _navBarVisibilityAnimationEnabled;
+ set { _navBarVisibilityAnimationEnabled = value; OnPropertyChanged(); }
+ }
+
+ public PresentationMode PresentationMode
+ {
+ get => _presentationMode;
+ set { _presentationMode = value; OnPropertyChanged(); }
+ }
+
public event PropertyChangedEventHandler PropertyChanged;
- private void OnPropertyChanged([CallerMemberName] string name = "")
+ void OnPropertyChanged([CallerMemberName] string name = null)
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_IsVisibleFalse.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_IsVisibleFalse.png
new file mode 100644
index 000000000000..e287f759d71e
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_IsVisibleFalse.png differ
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_IsVisibleTrue.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_IsVisibleTrue.png
new file mode 100644
index 000000000000..06d51c8069bd
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_IsVisibleTrue.png differ
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeAnimated.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeAnimated.png
new file mode 100644
index 000000000000..63e75da153bb
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeAnimated.png differ
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModal.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModal.png
new file mode 100644
index 000000000000..cedca623260e
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModal.png differ
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModalAnimated.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModalAnimated.png
new file mode 100644
index 000000000000..cf3a7f315ce6
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModalAnimated.png differ
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModalNotAnimated.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModalNotAnimated.png
new file mode 100644
index 000000000000..75c7954a3aec
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeModalNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeNotAnimated.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeNotAnimated.png
new file mode 100644
index 000000000000..85a1c4fca1e3
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_PresentationModeNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_ShowTitleView.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_ShowTitleView.png
new file mode 100644
index 000000000000..134635b588ec
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_ShowTitleView.png differ
diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_ShowTitleViewHidden.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_ShowTitleViewHidden.png
new file mode 100644
index 000000000000..d6a32a5a4791
Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShellPages_ShowTitleViewHidden.png differ
diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellPagesFeatureTests.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellPagesFeatureTests.cs
new file mode 100644
index 000000000000..439a4c733853
--- /dev/null
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellPagesFeatureTests.cs
@@ -0,0 +1,498 @@
+using NUnit.Framework;
+using UITest.Appium;
+using UITest.Core;
+
+
+namespace Microsoft.Maui.TestCases.Tests;
+
+public class ShellPagesFeatureTests : _GalleryUITest
+{
+ public const string ShellPagesFeatureMatrix = "Shell Feature Matrix";
+ public override string GalleryPageName => ShellPagesFeatureMatrix;
+ public const string Options = "Options";
+ public const string Apply = "Apply";
+
+ public ShellPagesFeatureTests(TestDevice device)
+ : base(device)
+ {
+ }
+
+#if TEST_FAILS_ON_CATALYST // Issue Link: https://github.com/dotnet/maui/issues/32125
+ [Test, Order(5)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_TitleColor()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("RedTitleColor");
+ App.Tap("RedTitleColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/32992
+ [Test, Order(2)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_BackgroundColor()
+ {
+ if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
+ {
+ Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/32125
+ }
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("SkyBlueBackgroundColor");
+ App.Tap("SkyBlueBackgroundColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/5161
+ [Test, Order(3)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_DisabledColor()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("IsEnabledFalse");
+ App.Tap("IsEnabledFalse");
+ App.WaitForElement("VioletDisabledColor");
+ App.Tap("VioletDisabledColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_CATALYST // Issue Link: https://github.com/dotnet/maui/issues/32125
+ [Test, Order(4)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_UnselectedColor()
+ {
+ if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
+ {
+ Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/32125
+ }
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("BlueUnselectedColor");
+ App.Tap("BlueUnselectedColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+ [Test, Order(1)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_IsEnabledTrue()
+ {
+ App.WaitForElement("ShellPageButton");
+ App.Tap("ShellPageButton");
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("IsEnabledTrue");
+ App.Tap("IsEnabledTrue");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ App.WaitForElement("Tab3");
+ App.Tap("Tab3");
+ App.WaitForElement("Tab3Label");
+ App.WaitForElement("Tab3GoToHomeButton");
+ App.Tap("Tab3GoToHomeButton");
+ }
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/5161
+ [Test, Order(6)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_IsEnabledFalse()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("IsEnabledFalse");
+ App.Tap("IsEnabledFalse");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ App.WaitForElement("Tab3");
+ App.Tap("Tab3");
+ VerifyScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/32992
+ [Test, Order(7)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_ShowTitleViewWithBackgroundColor()
+ {
+ if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
+ {
+ Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/32125
+ }
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("SkyBlueBackgroundColor");
+ App.Tap("SkyBlueBackgroundColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ App.WaitForElement("ShowTitleViewButton");
+ App.Tap("ShowTitleViewButton");
+ VerifyScreenshot();
+ }
+#endif
+
+ [Test, Order(8)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_ShowTitleView()
+ {
+ App.WaitForElement(Options); // to reset the old value
+ App.Tap(Options);
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ App.WaitForElement("ShowTitleViewButton");
+ App.Tap("ShowTitleViewButton");
+ VerifyScreenshot();
+ }
+
+ [Test, Order(9)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_ShowTitleViewHidden()
+ {
+ App.WaitForElement("HideTitleViewButton");
+ App.Tap("HideTitleViewButton");
+ VerifyScreenshot();
+ }
+
+#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST // Issue Link: https://github.com/dotnet/maui/issues/17550
+ [Test, Order(10)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_NavBarVisibilityHide()
+ {
+ App.WaitForElement("NavBarHideButton");
+ App.Tap("NavBarHideButton");
+ VerifyScreenshot();
+ }
+
+ [Test, Order(11)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_NavBarVisibilityShow()
+ {
+ App.WaitForElement("NavBarShowButton");
+ App.Tap("NavBarShowButton");
+ VerifyScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/6399
+ [Test, Order(12)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_NavBarHasShadowTrue()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("WhiteBackgroundColor"); // For visible difference when shadow is applied
+ App.Tap("WhiteBackgroundColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ App.WaitForElement("ShadowTrue");
+ App.Tap("ShadowTrue");
+ VerifyScreenshot();
+ }
+
+ [Test, Order(13)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_NavBarHasShadowFalse()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("WhiteBackgroundColor"); // For visible difference when shadow is removed
+ App.Tap("WhiteBackgroundColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ App.WaitForElement("ShadowFalse");
+ App.Tap("ShadowFalse");
+ VerifyScreenshot();
+ }
+#endif
+
+ [Test, Order(14)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_IsVisibleFalse()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("IsVisibleFalse");
+ App.Tap("IsVisibleFalse");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+
+ [Test, Order(15)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_IsVisibleTrue()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("IsVisibleTrue");
+ App.Tap("IsVisibleTrue");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+
+ [Test, Order(16)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_PresentationModeNotAnimated()
+ {
+ App.WaitForElement("NotAnimatedButton");
+ App.Tap("NotAnimatedButton");
+ App.WaitForElement("GoBackButton");
+ VerifyScreenshot();
+ }
+
+ [Test, Order(17)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_PresentationModeAnimated()
+ {
+ App.WaitForElement("GoBackButton"); // To go back to controls page
+ App.Tap("GoBackButton");
+ App.WaitForElement("AnimatedButton");
+ App.Tap("AnimatedButton");
+ App.WaitForElement("GoBackButton");
+ VerifyScreenshot();
+ }
+
+ [Test, Order(18)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_PresentationModeModal()
+ {
+ App.WaitForElement("GoBackButton"); // To go back to controls page
+ App.Tap("GoBackButton");
+ App.WaitForElement("ModalButton");
+ App.Tap("ModalButton");
+ App.WaitForElement("GoBackButton");
+ VerifyScreenshot();
+ }
+
+ [Test, Order(19)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_PresentationModeModalAnimated()
+ {
+ App.WaitForElement("GoBackButton"); // To go back to controls page
+ App.Tap("GoBackButton");
+ App.WaitForElement("ModalAnimatedButton");
+ App.Tap("ModalAnimatedButton");
+ App.WaitForElement("GoBackButton");
+ VerifyScreenshot();
+ }
+
+ [Test, Order(20)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_PresentationModeModalNotAnimated()
+ {
+ App.WaitForElement("GoBackButton"); // To go back to controls page
+ App.Tap("GoBackButton");
+ App.WaitForElement("ModalNotAnimatedButton");
+ App.Tap("ModalNotAnimatedButton");
+ App.WaitForElement("GoBackButton");
+ VerifyScreenshot();
+ }
+
+#if TEST_FAILS_ON_CATALYST // Issue Link: https://github.com/dotnet/maui/issues/32125
+ [Test, Order(21)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_ForegroundColor()
+ {
+ App.WaitForElement("GoBackButton"); // To go back to controls page
+ App.Tap("GoBackButton");
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("MagentaForegroundColor");
+ App.Tap("MagentaForegroundColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+
+ [Test, Order(22)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_ForegroundColorAndTitleColor()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("MagentaForegroundColor");
+ App.Tap("MagentaForegroundColor");
+ App.WaitForElement("RedTitleColor");
+ App.Tap("RedTitleColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_CATALYST // Issue Link: https://github.com/dotnet/maui/issues/32125
+ [Test, Order(23)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_ForegroundColorAndUnselectedColor()
+ {
+ if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
+ {
+ Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/32125
+ }
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("MagentaForegroundColor");
+ App.Tap("MagentaForegroundColor");
+ App.WaitForElement("MaroonUnselectedColor");
+ App.Tap("MaroonUnselectedColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+
+#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS// Issue Link: https://github.com/dotnet/maui/issues/32992
+ [Test, Order(24)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_BackgroundColorAndForegroundColor()
+ {
+ if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
+ {
+ Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/32125
+ }
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("LightGreenBackgroundColor");
+ App.Tap("LightGreenBackgroundColor");
+ App.WaitForElement("MagentaForegroundColor");
+ App.Tap("MagentaForegroundColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+
+ [Test, Order(25)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_BackgroundColorAndTitleColor()
+ {
+ if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
+ {
+ Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/32125
+ }
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("LightGreenBackgroundColor");
+ App.Tap("LightGreenBackgroundColor");
+ App.WaitForElement("RedTitleColor");
+ App.Tap("RedTitleColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+
+ [Test, Order(26)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_BackgroundColorAndUnselectedColor()
+ {
+ if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
+ {
+ Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/32125
+ }
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("LightGreenBackgroundColor");
+ App.Tap("LightGreenBackgroundColor");
+ App.WaitForElement("MaroonUnselectedColor");
+ App.Tap("MaroonUnselectedColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/5161
+ [Test, Order(27)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_ForegroundColorAndDisabledColor()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("MagentaForegroundColor");
+ App.Tap("MagentaForegroundColor");
+ App.WaitForElement("IsEnabledFalse");
+ App.Tap("IsEnabledFalse");
+ App.WaitForElement("VioletDisabledColor");
+ App.Tap("VioletDisabledColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+
+ [Test, Order(28)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_DisabledColorAndUnselectedColor()
+ {
+ if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
+ {
+ Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/32125
+ }
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("MaroonUnselectedColor");
+ App.Tap("MaroonUnselectedColor");
+ App.WaitForElement("IsEnabledFalse");
+ App.Tap("IsEnabledFalse");
+ App.WaitForElement("VioletDisabledColor");
+ App.Tap("VioletDisabledColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS// Issue Link: https://github.com/dotnet/maui/issues/33909
+ [Test, Order(30)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_VerifyForegroundColorResetForBackButton()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("MagentaForegroundColor");
+ App.Tap("MagentaForegroundColor");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ VerifyShellScreenshot();
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS // Issue Link:https://github.com/dotnet/maui/issues/32993
+ [Test, Order(29)]
+ [Category(UITestCategories.Shell)]
+ public void ShellPages_FlowDirectionRTL()
+ {
+ App.WaitForElement(Options);
+ App.Tap(Options);
+ App.WaitForElement("FlowDirectionRTL");
+ App.Tap("FlowDirectionRTL");
+ App.WaitForElement(Apply);
+ App.Tap(Apply);
+ VerifyScreenshot();
+ }
+#endif
+
+ public void VerifyShellScreenshot()
+ {
+#if WINDOWS
+ VerifyScreenshot(includeTitleBar: true);
+#else
+ VerifyScreenshot();
+#endif
+ }
+}
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_FlowDirectionRTL.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_FlowDirectionRTL.png
new file mode 100644
index 000000000000..31ab40e67e9d
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_FlowDirectionRTL.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColor.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColor.png
new file mode 100644
index 000000000000..994447b573b4
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColor.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColorAndTitleColor.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColorAndTitleColor.png
new file mode 100644
index 000000000000..f1b8745d6e6f
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColorAndTitleColor.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColorAndUnselectedColor.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColorAndUnselectedColor.png
new file mode 100644
index 000000000000..eb3c13859924
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ForegroundColorAndUnselectedColor.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_IsVisibleFalse.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_IsVisibleFalse.png
new file mode 100644
index 000000000000..41f07703d1b6
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_IsVisibleFalse.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_IsVisibleTrue.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_IsVisibleTrue.png
new file mode 100644
index 000000000000..4cb3d15ce08c
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_IsVisibleTrue.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_NavBarVisibilityHide.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_NavBarVisibilityHide.png
new file mode 100644
index 000000000000..a6e3382c8efc
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_NavBarVisibilityHide.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_NavBarVisibilityShow.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_NavBarVisibilityShow.png
new file mode 100644
index 000000000000..e81cc2c335fd
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_NavBarVisibilityShow.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeAnimated.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeAnimated.png
new file mode 100644
index 000000000000..dcbe9e902457
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeAnimated.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModal.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModal.png
new file mode 100644
index 000000000000..f98d329dee80
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModal.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModalAnimated.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModalAnimated.png
new file mode 100644
index 000000000000..603698b32a23
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModalAnimated.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModalNotAnimated.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModalNotAnimated.png
new file mode 100644
index 000000000000..cd58446c7d9c
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeModalNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeNotAnimated.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeNotAnimated.png
new file mode 100644
index 000000000000..3d427837c613
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_PresentationModeNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ShowTitleView.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ShowTitleView.png
new file mode 100644
index 000000000000..b9b2ee28aa43
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ShowTitleView.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ShowTitleViewHidden.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ShowTitleViewHidden.png
new file mode 100644
index 000000000000..d6a2e5192d78
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_ShowTitleViewHidden.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_TitleColor.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_TitleColor.png
new file mode 100644
index 000000000000..d664a8c6c4e7
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_TitleColor.png differ
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_UnselectedColor.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_UnselectedColor.png
new file mode 100644
index 000000000000..a78baeec347e
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShellPages_UnselectedColor.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ForegroundColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ForegroundColor.png
new file mode 100644
index 000000000000..256bcdd7d8fd
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ForegroundColor.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ForegroundColorAndTitleColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ForegroundColorAndTitleColor.png
new file mode 100644
index 000000000000..e2c633e3684d
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ForegroundColorAndTitleColor.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_IsVisibleFalse.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_IsVisibleFalse.png
new file mode 100644
index 000000000000..f89107e88aba
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_IsVisibleFalse.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_IsVisibleTrue.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_IsVisibleTrue.png
new file mode 100644
index 000000000000..c16bfb1ae64b
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_IsVisibleTrue.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeAnimated.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeAnimated.png
new file mode 100644
index 000000000000..6fc102c3609b
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeAnimated.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModal.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModal.png
new file mode 100644
index 000000000000..0493fd842cbb
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModal.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModalAnimated.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModalAnimated.png
new file mode 100644
index 000000000000..f0f80f6bda61
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModalAnimated.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModalNotAnimated.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModalNotAnimated.png
new file mode 100644
index 000000000000..435129f6fa56
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeModalNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeNotAnimated.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeNotAnimated.png
new file mode 100644
index 000000000000..82a91f1cf89a
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_PresentationModeNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ShowTitleView.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ShowTitleView.png
new file mode 100644
index 000000000000..ce7034ad7800
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ShowTitleView.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ShowTitleViewHidden.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ShowTitleViewHidden.png
new file mode 100644
index 000000000000..3c28b66397af
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_ShowTitleViewHidden.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_TitleColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_TitleColor.png
new file mode 100644
index 000000000000..0eaa031195c5
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ShellPages_TitleColor.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColor.png
new file mode 100644
index 000000000000..c345cd6e1151
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColor.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColorAndTitleColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColorAndTitleColor.png
new file mode 100644
index 000000000000..06a13382dc2a
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColorAndTitleColor.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColorAndUnselectedColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColorAndUnselectedColor.png
new file mode 100644
index 000000000000..6aad595e7396
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ForegroundColorAndUnselectedColor.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_IsVisibleFalse.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_IsVisibleFalse.png
new file mode 100644
index 000000000000..211520701a36
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_IsVisibleFalse.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_IsVisibleTrue.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_IsVisibleTrue.png
new file mode 100644
index 000000000000..3560812b7f75
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_IsVisibleTrue.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeAnimated.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeAnimated.png
new file mode 100644
index 000000000000..a076c268d473
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeAnimated.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModal.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModal.png
new file mode 100644
index 000000000000..6b97e12605f1
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModal.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModalAnimated.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModalAnimated.png
new file mode 100644
index 000000000000..5a714f439ce6
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModalAnimated.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModalNotAnimated.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModalNotAnimated.png
new file mode 100644
index 000000000000..901b8e8cb299
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeModalNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeNotAnimated.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeNotAnimated.png
new file mode 100644
index 000000000000..07b0ecea52ce
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_PresentationModeNotAnimated.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ShowTitleView.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ShowTitleView.png
new file mode 100644
index 000000000000..d56fc46b5e3c
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ShowTitleView.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ShowTitleViewHidden.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ShowTitleViewHidden.png
new file mode 100644
index 000000000000..7e8df68840dd
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_ShowTitleViewHidden.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_TitleColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_TitleColor.png
new file mode 100644
index 000000000000..ac23a67b2d81
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_TitleColor.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_UnselectedColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_UnselectedColor.png
new file mode 100644
index 000000000000..761c2b1f0f3e
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShellPages_UnselectedColor.png differ