├── .gitignore
├── App.xaml
├── App.xaml.cs
├── Droid
├── Assets
│ └── AboutAssets.txt
├── HamburgerMenuExample.Droid.csproj
├── MainActivity.cs
├── Properties
│ ├── AndroidManifest.xml
│ └── AssemblyInfo.cs
├── Resources
│ ├── AboutResources.txt
│ ├── drawable-hdpi
│ │ └── icon.png
│ ├── drawable-xhdpi
│ │ └── icon.png
│ ├── drawable-xxhdpi
│ │ └── icon.png
│ ├── drawable
│ │ └── icon.png
│ ├── layout
│ │ ├── Tabbar.axml
│ │ └── Toolbar.axml
│ └── values
│ │ └── styles.xml
└── packages.config
├── HamburgerMenuExample.csproj
├── HamburgerMenuExample.sln
├── Properties
└── AssemblyInfo.cs
├── ViewModels
└── MenuPageViewModel.cs
├── Views
├── HomePage.xaml
├── HomePage.xaml.cs
├── MenuPage.xaml
├── MenuPage.xaml.cs
├── RootPage.cs
├── RootPage.xaml
├── SecondPage.xaml
└── SecondPage.xaml.cs
├── iOS
├── AppDelegate.cs
├── Assets.xcassets
│ ├── AppIcons.appiconset
│ │ └── Contents.json
│ └── Contents.json
├── Entitlements.plist
├── HamburgerMenuExample.iOS.csproj
├── Info.plist
├── LaunchScreen.storyboard
├── Main.cs
└── packages.config
└── packages.config
/.gitignore:
--------------------------------------------------------------------------------
1 | #Autosave files
2 | *~
3 |
4 | #build
5 | [Oo]bj/
6 | [Bb]in/
7 | packages/
8 | TestResults/
9 |
10 | # globs
11 | Makefile.in
12 | *.DS_Store
13 | *.sln.cache
14 | *.suo
15 | *.cache
16 | *.pidb
17 | *.userprefs
18 | *.usertasks
19 | config.log
20 | config.make
21 | config.status
22 | aclocal.m4
23 | install-sh
24 | autom4te.cache/
25 | *.user
26 | *.tar.gz
27 | tarballs/
28 | test-results/
29 | Thumbs.db
30 |
31 | #Mac bundle stuff
32 | *.dmg
33 | *.app
34 |
35 | #resharper
36 | *_Resharper.*
37 | *.Resharper
38 |
39 | #dotCover
40 | *.dotCover
41 |
--------------------------------------------------------------------------------
/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace HamburgerMenuExample {
4 | public partial class App : Application {
5 |
6 | // *********************************************************************
7 | // TODO: wrap in a global Navigation Service (for example purposes only)
8 | // https://wolfprogrammer.com/2016/07/22/navigation-using-mvvm-light/
9 | public static NavigationPage NavigationPage { get; private set; }
10 | private static RootPage RootPage;
11 | public static bool MenuIsPresented {
12 | get {
13 | return RootPage.IsPresented;
14 | }
15 | set {
16 | RootPage.IsPresented = value;
17 | }
18 | }
19 | // *********************************************************************
20 |
21 | public App() {
22 | InitializeComponent();
23 | var menuPage = new MenuPage();
24 | NavigationPage = new NavigationPage(new HomePage());
25 | RootPage = new RootPage();
26 | RootPage.Master = menuPage;
27 | RootPage.Detail = NavigationPage;
28 | MainPage = RootPage;
29 | }
30 |
31 | protected override void OnStart() {
32 | // Handle when your app starts
33 | }
34 |
35 | protected override void OnSleep() {
36 | // Handle when your app sleeps
37 | }
38 |
39 | protected override void OnResume() {
40 | // Handle when your app resumes
41 | }
42 | }
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/Droid/HamburgerMenuExample.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}
7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Library
9 | HamburgerMenuExample.Droid
10 | HamburgerMenuExample.Droid
11 | v6.0
12 | True
13 | Resources\Resource.designer.cs
14 | Resource
15 | Properties\AndroidManifest.xml
16 | Resources
17 | Assets
18 | true
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug
25 | DEBUG;
26 | prompt
27 | 4
28 | false
29 | None
30 |
31 |
32 | true
33 | bin\Release
34 | prompt
35 | 4
36 | false
37 | false
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | ..\packages\Xamarin.Android.Support.v4.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
46 |
47 |
48 | ..\packages\Xamarin.Android.Support.v7.AppCompat.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
49 |
50 |
51 | ..\packages\Xamarin.Android.Support.Design.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.Design.dll
52 |
53 |
54 | ..\packages\Xamarin.Android.Support.v7.CardView.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
55 |
56 |
57 | ..\packages\Xamarin.Android.Support.v7.MediaRouter.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
58 |
59 |
60 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
61 |
62 |
63 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\MonoAndroid10\FormsViewGroup.dll
64 |
65 |
66 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\MonoAndroid10\Xamarin.Forms.Core.dll
67 |
68 |
69 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
70 |
71 |
72 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
73 |
74 |
75 |
76 |
77 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}
78 | HamburgerMenuExample
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content;
5 | using Android.Content.PM;
6 | using Android.Runtime;
7 | using Android.Views;
8 | using Android.Widget;
9 | using Android.OS;
10 |
11 | namespace HamburgerMenuExample.Droid {
12 | [Activity(Label = "HamburgerMenuExample.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity {
14 | protected override void OnCreate(Bundle bundle) {
15 | TabLayoutResource = Resource.Layout.Tabbar;
16 | ToolbarResource = Resource.Layout.Toolbar;
17 |
18 | base.OnCreate(bundle);
19 |
20 | global::Xamarin.Forms.Forms.Init(this, bundle);
21 |
22 | LoadApplication(new App());
23 | }
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using Android.App;
4 |
5 | // Information about this assembly is defined by the following attributes.
6 | // Change them to the values specific to your project.
7 |
8 | [assembly: AssemblyTitle("HamburgerMenuExample.Droid")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("")]
13 | [assembly: AssemblyCopyright("thomas")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
20 |
21 | [assembly: AssemblyVersion("1.0.0")]
22 |
23 | // The following attributes are used to specify the signing key for the assembly,
24 | // if desired. See the Mono documentation for more information about signing.
25 |
26 | //[assembly: AssemblyDelaySign(false)]
27 | //[assembly: AssemblyKeyFile("")]
28 |
29 |
--------------------------------------------------------------------------------
/Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
45 |
--------------------------------------------------------------------------------
/Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twolfprogrammer/Xamarin.Forms-Hamburger-Menu-Example/fcff09e149f1a3083fe48d39edcc0bf926c98518/Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twolfprogrammer/Xamarin.Forms-Hamburger-Menu-Example/fcff09e149f1a3083fe48d39edcc0bf926c98518/Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twolfprogrammer/Xamarin.Forms-Hamburger-Menu-Example/fcff09e149f1a3083fe48d39edcc0bf926c98518/Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twolfprogrammer/Xamarin.Forms-Hamburger-Menu-Example/fcff09e149f1a3083fe48d39edcc0bf926c98518/Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/Droid/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Droid/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Droid/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
24 |
27 |
28 |
--------------------------------------------------------------------------------
/Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/HamburgerMenuExample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}
7 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | true
9 | Library
10 | HamburgerMenuExample
11 | HamburgerMenuExample
12 | v4.5
13 | Profile78
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug
20 | DEBUG;
21 | prompt
22 | 4
23 | false
24 |
25 |
26 | true
27 | bin\Release
28 | prompt
29 | 4
30 | false
31 |
32 |
33 |
34 |
35 |
36 | MSBuild:UpdateDesignTimeXaml
37 |
38 |
39 | MSBuild:UpdateDesignTimeXaml
40 |
41 |
42 | MSBuild:UpdateDesignTimeXaml
43 |
44 |
45 |
46 |
47 | App.xaml
48 |
49 |
50 |
51 | RootPage.xaml
52 |
53 |
54 | HomePage.xaml
55 |
56 |
57 | SecondPage.xaml
58 |
59 |
60 | MenuPage.xaml
61 |
62 |
63 |
64 |
65 |
66 | packages\Xamarin.Forms.2.0.1.6495\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll
67 |
68 |
69 | packages\Xamarin.Forms.2.0.1.6495\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll
70 |
71 |
72 | packages\Xamarin.Forms.2.0.1.6495\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/HamburgerMenuExample.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HamburgerMenuExample", "HamburgerMenuExample.csproj", "{1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HamburgerMenuExample.iOS", "iOS\HamburgerMenuExample.iOS.csproj", "{CFFCCD81-7821-4002-87B3-7288C2B3FDBC}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HamburgerMenuExample.Droid", "Droid\HamburgerMenuExample.Droid.csproj", "{A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
15 | Release|iPhone = Release|iPhone
16 | Release|iPhoneSimulator = Release|iPhoneSimulator
17 | Debug|iPhone = Debug|iPhone
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Release|Any CPU.Build.0 = Release|Any CPU
24 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
25 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
26 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Release|iPhone.ActiveCfg = Release|Any CPU
27 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Release|iPhone.Build.0 = Release|Any CPU
28 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
29 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
30 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Debug|iPhone.ActiveCfg = Debug|Any CPU
31 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}.Debug|iPhone.Build.0 = Debug|Any CPU
32 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
33 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
34 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Release|Any CPU.ActiveCfg = Debug|iPhoneSimulator
35 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Release|Any CPU.Build.0 = Debug|iPhoneSimulator
36 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
37 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
38 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Release|iPhone.ActiveCfg = Release|iPhone
39 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Release|iPhone.Build.0 = Release|iPhone
40 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
41 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
42 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Debug|iPhone.ActiveCfg = Debug|iPhone
43 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}.Debug|iPhone.Build.0 = Debug|iPhone
44 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
46 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
47 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Release|Any CPU.Build.0 = Release|Any CPU
48 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
49 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
50 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Release|iPhone.ActiveCfg = Release|Any CPU
51 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Release|iPhone.Build.0 = Release|Any CPU
52 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
53 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
54 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
55 | {A7C08F89-D2F1-43D3-9CDC-FB4311BF05D1}.Debug|iPhone.Build.0 = Debug|Any CPU
56 | EndGlobalSection
57 | EndGlobal
58 |
--------------------------------------------------------------------------------
/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("HamburgerMenuExample")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("thomas")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/ViewModels/MenuPageViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Input;
3 | using Xamarin.Forms;
4 |
5 | namespace HamburgerMenuExample {
6 | public class MenuPageViewModel {
7 |
8 | public ICommand GoHomeCommand { get; set; }
9 | public ICommand GoSecondCommand { get; set; }
10 |
11 | public MenuPageViewModel() {
12 | GoHomeCommand = new Command(GoHome);
13 | GoSecondCommand = new Command(GoSecond);
14 | }
15 |
16 | void GoHome(object obj) {
17 | App.NavigationPage.Navigation.PopToRootAsync();
18 | App.MenuIsPresented = false;
19 | }
20 |
21 | void GoSecond(object obj) {
22 | App.NavigationPage.Navigation.PushAsync(new SecondPage());
23 | App.MenuIsPresented = false;
24 | }
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/Views/HomePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Views/HomePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace HamburgerMenuExample {
7 | public partial class HomePage : ContentPage {
8 | public HomePage() {
9 | InitializeComponent();
10 | }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/Views/MenuPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Views/MenuPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace HamburgerMenuExample {
7 | public partial class MenuPage : ContentPage {
8 | public MenuPage() {
9 | BindingContext = new MenuPageViewModel();
10 | Title = "Menu";
11 | InitializeComponent();
12 | }
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/Views/RootPage.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace HamburgerMenuExample {
4 | public partial class RootPage : MasterDetailPage {
5 | public RootPage() {
6 | InitializeComponent();
7 | MasterBehavior = MasterBehavior.Popover;
8 | }
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/Views/RootPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Views/SecondPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Views/SecondPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace HamburgerMenuExample {
7 | public partial class SecondPage : ContentPage {
8 | public SecondPage() {
9 | InitializeComponent();
10 | }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace HamburgerMenuExample.iOS {
9 | [Register("AppDelegate")]
10 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate {
11 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) {
12 | global::Xamarin.Forms.Forms.Init();
13 |
14 | LoadApplication(new App());
15 |
16 | return base.FinishedLaunching(app, options);
17 | }
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/iOS/Assets.xcassets/AppIcons.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "idiom": "iphone",
5 | "size": "29x29",
6 | "scale": "1x"
7 | },
8 | {
9 | "idiom": "iphone",
10 | "size": "29x29",
11 | "scale": "2x"
12 | },
13 | {
14 | "idiom": "iphone",
15 | "size": "29x29",
16 | "scale": "3x"
17 | },
18 | {
19 | "idiom": "iphone",
20 | "size": "40x40",
21 | "scale": "2x"
22 | },
23 | {
24 | "idiom": "iphone",
25 | "size": "40x40",
26 | "scale": "3x"
27 | },
28 | {
29 | "idiom": "iphone",
30 | "size": "57x57",
31 | "scale": "1x"
32 | },
33 | {
34 | "idiom": "iphone",
35 | "size": "57x57",
36 | "scale": "2x"
37 | },
38 | {
39 | "idiom": "iphone",
40 | "size": "60x60",
41 | "scale": "2x"
42 | },
43 | {
44 | "idiom": "iphone",
45 | "size": "60x60",
46 | "scale": "3x"
47 | },
48 | {
49 | "idiom": "ipad",
50 | "size": "29x29",
51 | "scale": "1x"
52 | },
53 | {
54 | "idiom": "ipad",
55 | "size": "29x29",
56 | "scale": "2x"
57 | },
58 | {
59 | "idiom": "ipad",
60 | "size": "40x40",
61 | "scale": "1x"
62 | },
63 | {
64 | "idiom": "ipad",
65 | "size": "40x40",
66 | "scale": "2x"
67 | },
68 | {
69 | "idiom": "ipad",
70 | "size": "50x50",
71 | "scale": "1x"
72 | },
73 | {
74 | "idiom": "ipad",
75 | "size": "50x50",
76 | "scale": "2x"
77 | },
78 | {
79 | "idiom": "ipad",
80 | "size": "72x72",
81 | "scale": "1x"
82 | },
83 | {
84 | "idiom": "ipad",
85 | "size": "72x72",
86 | "scale": "2x"
87 | },
88 | {
89 | "idiom": "ipad",
90 | "size": "76x76",
91 | "scale": "1x"
92 | },
93 | {
94 | "idiom": "ipad",
95 | "size": "76x76",
96 | "scale": "2x"
97 | },
98 | {
99 | "size": "24x24",
100 | "idiom": "watch",
101 | "scale": "2x",
102 | "role": "notificationCenter",
103 | "subtype": "38mm"
104 | },
105 | {
106 | "size": "27.5x27.5",
107 | "idiom": "watch",
108 | "scale": "2x",
109 | "role": "notificationCenter",
110 | "subtype": "42mm"
111 | },
112 | {
113 | "size": "29x29",
114 | "idiom": "watch",
115 | "role": "companionSettings",
116 | "scale": "2x"
117 | },
118 | {
119 | "size": "29x29",
120 | "idiom": "watch",
121 | "role": "companionSettings",
122 | "scale": "3x"
123 | },
124 | {
125 | "size": "40x40",
126 | "idiom": "watch",
127 | "scale": "2x",
128 | "role": "appLauncher",
129 | "subtype": "38mm"
130 | },
131 | {
132 | "size": "44x44",
133 | "idiom": "watch",
134 | "scale": "2x",
135 | "role": "longLook",
136 | "subtype": "42mm"
137 | },
138 | {
139 | "size": "86x86",
140 | "idiom": "watch",
141 | "scale": "2x",
142 | "role": "quickLook",
143 | "subtype": "38mm"
144 | },
145 | {
146 | "size": "98x98",
147 | "idiom": "watch",
148 | "scale": "2x",
149 | "role": "quickLook",
150 | "subtype": "42mm"
151 | }
152 | ],
153 | "info": {
154 | "version": 1,
155 | "author": "xcode"
156 | }
157 | }
--------------------------------------------------------------------------------
/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS/HamburgerMenuExample.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | {CFFCCD81-7821-4002-87B3-7288C2B3FDBC}
7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Exe
9 | HamburgerMenuExample.iOS
10 | HamburgerMenuExample.iOS
11 | Resources
12 |
13 |
14 | true
15 | full
16 | false
17 | bin\iPhoneSimulator\Debug
18 | DEBUG;ENABLE_TEST_CLOUD;
19 | prompt
20 | 4
21 | false
22 | iPhone Developer
23 | true
24 | true
25 | true
26 | true
27 | None
28 | i386
29 | HttpClientHandler
30 | Default
31 | x86
32 |
33 |
34 | true
35 | bin\iPhone\Release
36 | prompt
37 | 4
38 | false
39 | iPhone Developer
40 | true
41 | true
42 | true
43 | Entitlements.plist
44 | SdkOnly
45 | ARMv7, ARM64
46 | HttpClientHandler
47 | Default
48 | x86
49 |
50 |
51 | true
52 | bin\iPhoneSimulator\Release
53 | prompt
54 | 4
55 | false
56 | iPhone Developer
57 | true
58 | true
59 | None
60 | i386
61 | HttpClientHandler
62 | Default
63 | x86
64 |
65 |
66 | true
67 | full
68 | false
69 | bin\iPhone\Debug
70 | DEBUG;ENABLE_TEST_CLOUD;
71 | prompt
72 | 4
73 | false
74 | iPhone Developer
75 | true
76 | true
77 | true
78 | true
79 | true
80 | true
81 | Entitlements.plist
82 | SdkOnly
83 | ARMv7, ARM64
84 | HttpClientHandler
85 | Default
86 | x86
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
95 |
96 |
97 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
98 |
99 |
100 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
101 |
102 |
103 | ..\packages\Xamarin.Forms.2.0.1.6495\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll
104 |
105 |
106 |
107 |
108 | {1A8D3DEC-3045-4050-99ED-4EC9AC4CCEDB}
109 | HamburgerMenuExample
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDisplayName
6 | HamburgerMenuExample
7 | CFBundleName
8 | HamburgerMenuExample
9 | CFBundleIdentifier
10 | com.wolfprogrammer.hamburgermenuexample
11 | CFBundleShortVersionString
12 | 1.0
13 | CFBundleVersion
14 | 1.0
15 | LSRequiresIPhoneOS
16 |
17 | MinimumOSVersion
18 | 8.0
19 | UIDeviceFamily
20 |
21 | 1
22 | 2
23 |
24 | UILaunchStoryboardName
25 | LaunchScreen
26 | UIRequiredDeviceCapabilities
27 |
28 | armv7
29 |
30 | UISupportedInterfaceOrientations
31 |
32 | UIInterfaceOrientationPortrait
33 | UIInterfaceOrientationLandscapeLeft
34 | UIInterfaceOrientationLandscapeRight
35 |
36 | UISupportedInterfaceOrientations~ipad
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationPortraitUpsideDown
40 | UIInterfaceOrientationLandscapeLeft
41 | UIInterfaceOrientationLandscapeRight
42 |
43 | XSAppIconAssets
44 | Assets.xcassets/AppIcons.appiconset
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace HamburgerMenuExample.iOS {
9 | public class Application {
10 | // This is the main entry point of the application.
11 | static void Main(string[] args) {
12 | // if you want to use a different Application Delegate class from "AppDelegate"
13 | // you can specify it here.
14 | UIApplication.Main(args, null, "AppDelegate");
15 | }
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------