diff --git a/src/Controls/samples/Controls.Sample/Pages/Base/BasePage.cs b/src/Controls/samples/Controls.Sample/Pages/Base/BasePage.cs
index 6de9449c44..b4583d393a 100644
--- a/src/Controls/samples/Controls.Sample/Pages/Base/BasePage.cs
+++ b/src/Controls/samples/Controls.Sample/Pages/Base/BasePage.cs
@@ -24,17 +24,15 @@ namespace Maui.Controls.Sample.Pages.Base
ToolbarItems.Add(new ToolbarItem()
{
- Text = "RTL",
+ Text = "Settings",
+ IconImageSource = ImageSource.FromFile("settings.png"),
Command = new Command(OnToolbarItemClicked)
});
}
- private void OnToolbarItemClicked()
+ void OnToolbarItemClicked()
{
- if (FlowDirection != Microsoft.Maui.FlowDirection.RightToLeft)
- FlowDirection = Microsoft.Maui.FlowDirection.RightToLeft;
- else
- FlowDirection = Microsoft.Maui.FlowDirection.LeftToRight;
+ Navigation.PushModalAsync(new SettingsPage());
}
protected override void OnAppearing()
diff --git a/src/Controls/samples/Controls.Sample/Pages/Core/MultiWindowPage.xaml b/src/Controls/samples/Controls.Sample/Pages/Core/MultiWindowPage.xaml
new file mode 100644
index 0000000000..f9c02f5731
--- /dev/null
+++ b/src/Controls/samples/Controls.Sample/Pages/Core/MultiWindowPage.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/samples/Controls.Sample/Pages/Core/MultiWindowPage.xaml.cs b/src/Controls/samples/Controls.Sample/Pages/Core/MultiWindowPage.xaml.cs
new file mode 100644
index 0000000000..8380fdad25
--- /dev/null
+++ b/src/Controls/samples/Controls.Sample/Pages/Core/MultiWindowPage.xaml.cs
@@ -0,0 +1,19 @@
+using System;
+using Maui.Controls.Sample.Pages.Base;
+using Microsoft.Maui.Controls;
+
+namespace Maui.Controls.Sample.Pages
+{
+ public partial class MultiWindowPage : BasePage
+ {
+ public MultiWindowPage()
+ {
+ InitializeComponent();
+ }
+
+ void OnNewWindowClicked(object sender, EventArgs e)
+ {
+ Application.Current.OpenWindow(new Window(new MultiWindowPage()));
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/samples/Controls.Sample/Pages/MainPage.xaml b/src/Controls/samples/Controls.Sample/Pages/MainPage.xaml
index e02285c12b..6ef1121fd6 100644
--- a/src/Controls/samples/Controls.Sample/Pages/MainPage.xaml
+++ b/src/Controls/samples/Controls.Sample/Pages/MainPage.xaml
@@ -40,7 +40,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/samples/Controls.Sample/Pages/SettingsPage.xaml.cs b/src/Controls/samples/Controls.Sample/Pages/SettingsPage.xaml.cs
new file mode 100644
index 0000000000..e816972555
--- /dev/null
+++ b/src/Controls/samples/Controls.Sample/Pages/SettingsPage.xaml.cs
@@ -0,0 +1,32 @@
+using System;
+using Maui.Controls.Sample.Pages.Base;
+using Microsoft.Maui.Controls;
+
+namespace Maui.Controls.Sample.Pages
+{
+ public partial class SettingsPage : BasePage
+ {
+ public SettingsPage()
+ {
+ InitializeComponent();
+ }
+
+ void OnTapGestureRecognizerTapped(object sender, EventArgs args)
+ {
+ Navigation.PopModalAsync();
+ }
+
+ void OnRTLToggled(object sender, ToggledEventArgs e)
+ {
+ var mainPage = Application.Current.MainPage;
+
+ if (mainPage == null)
+ return;
+
+ if (mainPage.FlowDirection != Microsoft.Maui.FlowDirection.RightToLeft)
+ mainPage.FlowDirection = FlowDirection = Microsoft.Maui.FlowDirection.RightToLeft;
+ else
+ mainPage.FlowDirection = FlowDirection = Microsoft.Maui.FlowDirection.LeftToRight;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/samples/Controls.Sample/ViewModels/CoreViewModel.cs b/src/Controls/samples/Controls.Sample/ViewModels/CoreViewModel.cs
index 1eddd70908..b0efbccd31 100644
--- a/src/Controls/samples/Controls.Sample/ViewModels/CoreViewModel.cs
+++ b/src/Controls/samples/Controls.Sample/ViewModels/CoreViewModel.cs
@@ -36,6 +36,9 @@ namespace Maui.Controls.Sample.ViewModels
new SectionModel(typeof(ModalPage), "Modal",
"Allows you to push and pop Modal Pages."),
+ new SectionModel(typeof(MultiWindowPage), "Multi-Window",
+ "Allows you to open a new Window in the App."),
+
new SectionModel(typeof(NavigationGallery), "Navigation Page",
"Play with the different Navigation APIs."),
diff --git a/src/Controls/samples/Controls.Sample/ViewModels/SettingsViewModel.cs b/src/Controls/samples/Controls.Sample/ViewModels/SettingsViewModel.cs
new file mode 100644
index 0000000000..6624744406
--- /dev/null
+++ b/src/Controls/samples/Controls.Sample/ViewModels/SettingsViewModel.cs
@@ -0,0 +1,9 @@
+using Maui.Controls.Sample.ViewModels.Base;
+
+namespace Maui.Controls.Sample.ViewModels
+{
+ public class SettingsViewModel : BaseViewModel
+ {
+
+ }
+}
\ No newline at end of file