summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/NavigationPageiOS.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/NavigationPageiOS.cs')
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/NavigationPageiOS.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/NavigationPageiOS.cs b/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/NavigationPageiOS.cs
new file mode 100644
index 00000000..92f278bb
--- /dev/null
+++ b/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/NavigationPageiOS.cs
@@ -0,0 +1,40 @@
+using System.Windows.Input;
+using Xamarin.Forms.PlatformConfiguration;
+using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
+
+namespace Xamarin.Forms.Controls.GalleryPages.PlatformSpecificsGalleries
+{
+ public class NavigationPageiOS : NavigationPage
+ {
+ public static NavigationPageiOS Create(ICommand restore)
+ {
+ var restoreButton = new Button { Text = "Back To Gallery" };
+ restoreButton.Clicked += (sender, args) => restore.Execute(null);
+
+ var translucentToggleButton = new Button { Text = "Toggle Translucent NavBar" };
+
+ var content = new ContentPage
+ {
+ Title = "Navigation Page Features",
+ Content = new StackLayout
+ {
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.Center,
+ Children = { translucentToggleButton, restoreButton }
+ }
+ };
+
+ var navPage = new NavigationPageiOS(content, restore);
+
+ translucentToggleButton.Clicked += (sender, args) => navPage.On<iOS>().SetIsNavigationBarTranslucent(!navPage.On<iOS>().IsNavigationBarTranslucent());
+
+ return navPage;
+ }
+
+ public NavigationPageiOS(Page root, ICommand restore) : base(root)
+ {
+ BackgroundColor = Color.Pink;
+ On<iOS>().EnableTranslucentNavigationBar();
+ }
+ }
+} \ No newline at end of file