├── .gitattributes
├── .gitignore
├── LICENSE
├── MupApps.MvvmCross.Plugins.ControlsNavigation
├── .gitignore
├── .nuget
│ ├── NuGet.Config
│ ├── NuGet.exe
│ └── NuGet.targets
├── MupApps.MvvmCross.Plugins.ControlsNavigation.Droid
│ ├── MupApps.MvvmCross.Plugins.ControlsNavigation.Droid.csproj
│ ├── MvxAndroidControl.cs
│ ├── MvxAndroidControlPresenter.cs
│ ├── Plugin.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── Resource.Designer.cs
│ │ └── Values
│ │ │ └── Strings.xml
│ └── packages.config
├── MupApps.MvvmCross.Plugins.ControlsNavigation.Touch
│ ├── MupApps.MvvmCross.Plugins.ControlsNavigation.Touch.csproj
│ ├── MvxTouchControl.cs
│ ├── MvxTouchControlPresenter.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
├── MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone
│ ├── MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone.csproj
│ ├── MvxPhoneControl.cs
│ ├── MvxPhoneControlPresenter.cs
│ ├── Plugin.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
├── MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore
│ ├── MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore.csproj
│ ├── MvxStoreControl.cs
│ ├── MvxStoreControlPresenter.cs
│ ├── Plugin.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
├── MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf
│ ├── MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf.csproj
│ ├── MvxWpfControl.cs
│ ├── MvxWpfControlPresenter.cs
│ ├── Plugin.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
├── MupApps.MvvmCross.Plugins.ControlsNavigation.sln
├── MupApps.MvvmCross.Plugins.ControlsNavigation
│ ├── EmptyControlBehaviours.cs
│ ├── IMvxControl.cs
│ ├── IMvxControlFinder.cs
│ ├── IMvxControlsContainer.cs
│ ├── IMvxDataContextChanged.cs
│ ├── MupApps.MvvmCross.Plugins.ControlsNavigation.csproj
│ ├── MvxControlExtensions.cs
│ ├── MvxControlPresenter.cs
│ ├── MvxControlsContainer.cs
│ ├── Plugin.cs
│ ├── PluginLoader.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
└── Sample
│ ├── MupApps.ControlsNavigation.Sample.Core
│ ├── App.cs
│ ├── Model
│ │ ├── Folder.cs
│ │ └── Mail.cs
│ ├── MupApps.ControlsNavigation.Sample.Core.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Services
│ │ ├── IMailBoxService.cs
│ │ └── MailBoxService.cs
│ ├── ViewModels
│ │ ├── FirstViewModel.cs
│ │ ├── FolderViewModel.cs
│ │ ├── FoldersViewModel.cs
│ │ ├── MailViewModel.cs
│ │ └── SettingsViewModel.cs
│ └── packages.config
│ ├── MupApps.ControlsNavigation.Sample.Droid
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── DebugTrace.cs
│ ├── LinkerPleaseInclude.cs
│ ├── MupApps.ControlsNavigation.Sample.Droid.csproj
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Drawable
│ │ │ ├── Icon.png
│ │ │ └── splash.png
│ │ ├── Layout
│ │ │ ├── FirstView.axml
│ │ │ ├── ItemTemplate_Folder.axml
│ │ │ ├── ItemTemplate_Mail.axml
│ │ │ ├── SplashScreen.axml
│ │ │ ├── View_Folder.axml
│ │ │ ├── View_Folders.axml
│ │ │ ├── View_Mail.axml
│ │ │ └── View_Mails.axml
│ │ ├── Resource.Designer.cs
│ │ └── Values
│ │ │ ├── MvxBindingAttributes.xml
│ │ │ ├── SplashStyle.xml
│ │ │ └── Strings.xml
│ ├── Setup.cs
│ ├── SplashScreen.cs
│ ├── Views
│ │ ├── FolderView.cs
│ │ ├── FoldersView.cs
│ │ └── MailView.cs
│ └── packages.config
│ ├── MupApps.ControlsNavigation.Sample.DroidTablet
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── Controls
│ │ ├── FolderControl.cs
│ │ └── MailControl.cs
│ ├── DebugTrace.cs
│ ├── LinkerPleaseInclude.cs
│ ├── MupApps.ControlsNavigation.Sample.DroidTablet.csproj
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Drawable
│ │ │ ├── Icon.png
│ │ │ ├── Settings.png
│ │ │ └── splash.png
│ │ ├── Layout
│ │ │ ├── FirstView.axml
│ │ │ ├── ItemTemplate_Folder.axml
│ │ │ ├── ItemTemplate_Mail.axml
│ │ │ ├── SplashScreen.axml
│ │ │ ├── View_Folder.axml
│ │ │ ├── View_Folders.axml
│ │ │ ├── View_Mail.axml
│ │ │ └── View_Settings.axml
│ │ ├── Resource.Designer.cs
│ │ └── Values
│ │ │ ├── MvxBindingAttributes.xml
│ │ │ ├── SplashStyle.xml
│ │ │ └── Strings.xml
│ ├── Setup.cs
│ ├── SplashScreen.cs
│ ├── Views
│ │ ├── FoldersView.cs
│ │ └── SettingsView.cs
│ └── packages.config
│ ├── MupApps.ControlsNavigation.Sample.IPad
│ ├── AppDelegate.cs
│ ├── CellTemplates
│ │ ├── FolderCellTemplate.cs
│ │ ├── FolderCellTemplate.designer.cs
│ │ ├── FolderCellTemplate.xib
│ │ ├── MailCellTemplate.cs
│ │ ├── MailCellTemplate.designer.cs
│ │ └── MailCellTemplate.xib
│ ├── Controls
│ │ ├── FolderControl.cs
│ │ ├── FolderControl.designer.cs
│ │ ├── FolderControl.xib
│ │ ├── MailControl.cs
│ │ ├── MailControl.designer.cs
│ │ └── MailControl.xib
│ ├── DebugTrace.cs
│ ├── Info.plist
│ ├── LinkerPleaseInclude.cs
│ ├── Main.cs
│ ├── MupApps.ControlsNavigation.Sample.IPad.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ └── Controls
│ │ │ └── MailControl.xib
│ ├── Setup.cs
│ ├── ToDo-MvvmCross-ControlsNavigation
│ │ └── _ Touch UI.txt
│ ├── ToDo-MvvmCross
│ │ └── _ Touch UI.txt
│ ├── Views
│ │ ├── FoldersView.cs
│ │ ├── FoldersView.designer.cs
│ │ └── FoldersView.xib
│ └── packages.config
│ ├── MupApps.ControlsNavigation.Sample.IPhone
│ ├── AppDelegate.cs
│ ├── CellTemplates
│ │ ├── FolderCellTemplate.cs
│ │ ├── FolderCellTemplate.designer.cs
│ │ ├── FolderCellTemplate.xib
│ │ ├── MailCellTemplate.cs
│ │ ├── MailCellTemplate.designer.cs
│ │ └── MailCellTemplate.xib
│ ├── DebugTrace.cs
│ ├── Entitlements.plist
│ ├── Info.plist
│ ├── LinkerPleaseInclude.cs
│ ├── Main.cs
│ ├── MupApps.ControlsNavigation.Sample.IPhone.csproj
│ ├── Resources
│ │ └── Default-568h@2x.png
│ ├── Setup.cs
│ ├── Views
│ │ ├── FolderView.cs
│ │ ├── FolderView.designer.cs
│ │ ├── FolderView.xib
│ │ ├── FoldersView.cs
│ │ ├── FoldersView.designer.cs
│ │ ├── FoldersView.xib
│ │ ├── MailView.cs
│ │ ├── MailView.designer.cs
│ │ └── MailView.xib
│ └── packages.config
│ ├── MupApps.ControlsNavigation.Sample.WindowsPhone
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── AlignmentGrid.png
│ │ ├── ApplicationIcon.png
│ │ └── Tiles
│ │ │ ├── FlipCycleTileLarge.png
│ │ │ ├── FlipCycleTileMedium.png
│ │ │ ├── FlipCycleTileSmall.png
│ │ │ ├── IconicTileMediumLarge.png
│ │ │ └── IconicTileSmall.png
│ ├── DebugTrace.cs
│ ├── MupApps.ControlsNavigation.Sample.WindowsPhone.csproj
│ ├── Properties
│ │ ├── AppManifest.xml
│ │ ├── AssemblyInfo.cs
│ │ └── WMAppManifest.xml
│ ├── Resources
│ │ ├── AppResources.Designer.cs
│ │ └── AppResources.resx
│ ├── SampleData
│ │ └── FoldersSampleDataSource
│ │ │ ├── FoldersSampleDataSource.xaml
│ │ │ ├── FoldersSampleDataSource.xaml.cs
│ │ │ └── FoldersSampleDataSource.xsd
│ ├── Setup.cs
│ ├── ToDo-MvvmCross
│ │ └── _ Windows Phone UI.txt
│ ├── Views
│ │ ├── FolderView.xaml
│ │ ├── FolderView.xaml.cs
│ │ ├── FoldersView.xaml
│ │ ├── FoldersView.xaml.cs
│ │ ├── MailView.xaml
│ │ └── MailView.xaml.cs
│ └── packages.config
│ ├── MupApps.ControlsNavigation.Sample.WindowsPhoneControls
│ └── ToDo-MvvmCross-ControlsNavigation
│ │ └── _ Windows Phone UI.txt
│ ├── MupApps.ControlsNavigation.Sample.WindowsStore
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── Logo.scale-100.png
│ │ ├── SmallLogo.scale-100.png
│ │ ├── SplashScreen.scale-100.png
│ │ └── StoreLogo.scale-100.png
│ ├── Bootstrap
│ │ └── TabletNavigationPluginBootstrap.cs
│ ├── Controls
│ │ ├── FolderControl.xaml
│ │ ├── FolderControl.xaml.cs
│ │ ├── MailControl.xaml
│ │ └── MailControl.xaml.cs
│ ├── DebugTrace.cs
│ ├── MupApps.ControlsNavigation.Sample.WindowsStore.csproj
│ ├── MupApps.ControlsNavigation.Sample.WindowsStore_TemporaryKey.pfx
│ ├── Package.appxmanifest
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SampleData
│ │ ├── FoldersSampleDataSource
│ │ │ ├── FoldersSampleDataSource.xaml
│ │ │ ├── FoldersSampleDataSource.xaml.cs
│ │ │ ├── FoldersSampleDataSource.xsd
│ │ │ └── FoldersSampleDataSource_Files
│ │ │ │ ├── image01.png
│ │ │ │ ├── image02.png
│ │ │ │ ├── image03.png
│ │ │ │ ├── image04.png
│ │ │ │ └── image05.png
│ │ ├── MailSampleDataSource
│ │ │ ├── MailSampleDataSource.xaml
│ │ │ ├── MailSampleDataSource.xaml.cs
│ │ │ ├── MailSampleDataSource.xsd
│ │ │ └── MailSampleDataSource_Files
│ │ │ │ ├── image01.png
│ │ │ │ ├── image02.png
│ │ │ │ ├── image03.png
│ │ │ │ ├── image04.png
│ │ │ │ └── image05.png
│ │ └── MailsSampleDataSource
│ │ │ ├── MailsSampleDataSource.xaml
│ │ │ ├── MailsSampleDataSource.xaml.cs
│ │ │ ├── MailsSampleDataSource.xsd
│ │ │ └── MailsSampleDataSource_Files
│ │ │ ├── image01.png
│ │ │ ├── image02.png
│ │ │ ├── image03.png
│ │ │ ├── image04.png
│ │ │ └── image05.png
│ ├── Setup.cs
│ ├── ToDo-MvvmCross
│ │ └── _ Windows Store UI.txt
│ ├── Views
│ │ ├── FoldersView.xaml
│ │ └── FoldersView.xaml.cs
│ └── packages.config
│ └── MupApps.ControlsNavigation.Sample.Wpf
│ ├── App.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Controls
│ ├── FolderControl.xaml
│ ├── FolderControl.xaml.cs
│ ├── MailControl.xaml
│ └── MailControl.xaml.cs
│ ├── DebugTrace.cs
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── MupApps.ControlsNavigation.Sample.Wpf.csproj
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ ├── Setup.cs
│ ├── ToDo-MvvmCross-ControlsNavigation
│ └── _ Wpf UI.txt
│ ├── ToDo-MvvmCross
│ └── _ Wpf UI.txt
│ ├── Views
│ ├── FoldersView.xaml
│ └── FoldersView.xaml.cs
│ └── packages.config
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | [Bb]in/
3 | [Oo]bj/
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | ## Ignore Visual Studio temporary files, build results, and
9 | ## files generated by popular Visual Studio add-ons.
10 |
11 | # User-specific files
12 | *.suo
13 | *.user
14 | *.sln.docstates
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Rr]elease/
19 | x64/
20 | *_i.c
21 | *_p.c
22 | *.ilk
23 | *.meta
24 | *.obj
25 | *.pch
26 | *.pdb
27 | *.pgc
28 | *.pgd
29 | *.rsp
30 | *.sbr
31 | *.tlb
32 | *.tli
33 | *.tlh
34 | *.tmp
35 | *.log
36 | *.vspscc
37 | *.vssscc
38 | .builds
39 |
40 | # Visual C++ cache files
41 | ipch/
42 | *.aps
43 | *.ncb
44 | *.opensdf
45 | *.sdf
46 |
47 | # Visual Studio profiler
48 | *.psess
49 | *.vsp
50 | *.vspx
51 |
52 | # Guidance Automation Toolkit
53 | *.gpState
54 |
55 | # ReSharper is a .NET coding add-in
56 | _ReSharper*
57 |
58 | # NCrunch
59 | *.ncrunch*
60 | .*crunch*.local.xml
61 |
62 | # Installshield output folder
63 | [Ee]xpress
64 |
65 | # DocProject is a documentation generator add-in
66 | DocProject/buildhelp/
67 | DocProject/Help/*.HxT
68 | DocProject/Help/*.HxC
69 | DocProject/Help/*.hhc
70 | DocProject/Help/*.hhk
71 | DocProject/Help/*.hhp
72 | DocProject/Help/Html2
73 | DocProject/Help/html
74 |
75 | # Click-Once directory
76 | publish
77 |
78 | # Publish Web Output
79 | *.Publish.xml
80 |
81 | # NuGet Packages Directory
82 | packages
83 |
84 | # Windows Azure Build Output
85 | csx
86 | *.build.csdef
87 |
88 | # Windows Store app package directory
89 | AppPackages/
90 |
91 | # Others
92 | [Bb]in
93 | [Oo]bj
94 | sql
95 | TestResults
96 | [Tt]est[Rr]esult*
97 | *.Cache
98 | ClientBin
99 | [Ss]tyle[Cc]op.*
100 | ~$*
101 | *.dbmdl
102 | Generated_Code #added for RIA/Silverlight projects
103 |
104 | # Backup & report files from converting an old project file to a newer
105 | # Visual Studio version. Backup files are not needed, because we have git ;-)
106 | _UpgradeReport_Files/
107 | Backup*/
108 | UpgradeLog*.XML
109 | *.userprefs
110 |
111 |
112 | # Nuget package files
113 | *.nupkg
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | [Bb]in/
3 | [Oo]bj/
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | ## Ignore Visual Studio temporary files, build results, and
9 | ## files generated by popular Visual Studio add-ons.
10 |
11 | # User-specific files
12 | *.suo
13 | *.user
14 | *.sln.docstates
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Rr]elease/
19 | x64/
20 | *_i.c
21 | *_p.c
22 | *.ilk
23 | *.meta
24 | *.obj
25 | *.pch
26 | *.pdb
27 | *.pgc
28 | *.pgd
29 | *.rsp
30 | *.sbr
31 | *.tlb
32 | *.tli
33 | *.tlh
34 | *.tmp
35 | *.log
36 | *.vspscc
37 | *.vssscc
38 | .builds
39 |
40 | # Visual C++ cache files
41 | ipch/
42 | *.aps
43 | *.ncb
44 | *.opensdf
45 | *.sdf
46 |
47 | # Visual Studio profiler
48 | *.psess
49 | *.vsp
50 | *.vspx
51 |
52 | # Guidance Automation Toolkit
53 | *.gpState
54 |
55 | # ReSharper is a .NET coding add-in
56 | _ReSharper*
57 |
58 | # NCrunch
59 | *.ncrunch*
60 | .*crunch*.local.xml
61 |
62 | # Installshield output folder
63 | [Ee]xpress
64 |
65 | # DocProject is a documentation generator add-in
66 | DocProject/buildhelp/
67 | DocProject/Help/*.HxT
68 | DocProject/Help/*.HxC
69 | DocProject/Help/*.hhc
70 | DocProject/Help/*.hhk
71 | DocProject/Help/*.hhp
72 | DocProject/Help/Html2
73 | DocProject/Help/html
74 |
75 | # Click-Once directory
76 | publish
77 |
78 | # Publish Web Output
79 | *.Publish.xml
80 |
81 | # NuGet Packages Directory
82 | #packages
83 |
84 | # Windows Azure Build Output
85 | csx
86 | *.build.csdef
87 |
88 | # Windows Store app package directory
89 | AppPackages/
90 |
91 | # Others
92 | [Bb]in
93 | [Oo]bj
94 | sql
95 | TestResults
96 | [Tt]est[Rr]esult*
97 | *.Cache
98 | ClientBin
99 | [Ss]tyle[Cc]op.*
100 | ~$*
101 | *.dbmdl
102 | Generated_Code #added for RIA/Silverlight projects
103 |
104 | # Backup & report files from converting an old project file to a newer
105 | # Visual Studio version. Backup files are not needed, because we have git ;-)
106 | _UpgradeReport_Files/
107 | Backup*/
108 | UpgradeLog*.XML
109 | *.userprefs
110 |
111 |
112 | # Nuget package files
113 | *.nupkg
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/.nuget/NuGet.exe
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Droid/MvxAndroidControlPresenter.cs:
--------------------------------------------------------------------------------
1 | // MvxAndroidControlPresenter.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.CrossCore;
7 | using Cirrious.MvvmCross.Droid.Views;
8 | using Cirrious.MvvmCross.ViewModels;
9 | using Cirrious.MvvmCross.Views;
10 | using Java.Lang;
11 |
12 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.Droid
13 | {
14 | public class MvxAndroidControlPresenter
15 | : MvxControlPresenter, IMvxAndroidViewPresenter
16 | {
17 | public MvxAndroidControlPresenter(IMvxViewPresenter viewPresenter) : base(viewPresenter)
18 | {
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Droid/Plugin.cs:
--------------------------------------------------------------------------------
1 | // Plugin.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.Droid
7 | {
8 | public class Plugin : ControlsNavigation.Plugin
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 | using Android.App;
9 |
10 | // General Information about an assembly is controlled through the following
11 | // set of attributes. Change these attribute values to modify the information
12 | // associated with an assembly.
13 | [assembly: AssemblyTitle("MupApps.MvvmCross.Plugins.ControlsNavigation.Droid")]
14 | [assembly: AssemblyDescription("")]
15 | [assembly: AssemblyConfiguration("")]
16 | [assembly: AssemblyCompany("")]
17 | [assembly: AssemblyProduct("MupApps.MvvmCross.Plugins.ControlsNavigation.Droid")]
18 | [assembly: AssemblyCopyright("Copyright © 2013")]
19 | [assembly: AssemblyTrademark("")]
20 | [assembly: AssemblyCulture("")]
21 | [assembly: ComVisible(false)]
22 |
23 | // Version information for an assembly consists of the following four values:
24 | //
25 | // Major Version
26 | // Minor Version
27 | // Build Number
28 | // Revision
29 | //
30 | // You can specify all the values or you can default the Build and Revision Numbers
31 | // by using the '*' as shown below:
32 | // [assembly: AssemblyVersion("1.0.*")]
33 | [assembly: AssemblyVersion("1.0.0.0")]
34 | [assembly: AssemblyFileVersion("1.0.0.0")]
35 |
36 | // Add some common permissions, these can be removed if not needed
37 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
38 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
39 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Droid/Resources/Resource.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Droid/Resources/Resource.Designer.cs
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Droid/Resources/Values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $projectname$
4 |
5 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Touch/MvxTouchControlPresenter.cs:
--------------------------------------------------------------------------------
1 | // MvxTouchControlPresenter.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.Touch.Views.Presenters;
7 | using Cirrious.MvvmCross.Views;
8 | using UIKit;
9 |
10 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.Touch
11 | {
12 | public class MvxTouchControlPresenter
13 | : MvxControlPresenter, IMvxTouchViewPresenter
14 | {
15 | protected IMvxTouchViewPresenter TouchViewPresenter
16 | {
17 | get
18 | {
19 | return _viewPresenter as IMvxTouchViewPresenter;
20 | }
21 | }
22 |
23 | public MvxTouchControlPresenter(IMvxViewPresenter viewPresenter) : base(viewPresenter)
24 | {
25 | }
26 |
27 | public bool PresentModalViewController(UIViewController controller, bool animated)
28 | {
29 | return TouchViewPresenter.PresentModalViewController(controller, animated);
30 | }
31 |
32 | public void NativeModalViewControllerDisappearedOnItsOwn()
33 | {
34 | TouchViewPresenter.NativeModalViewControllerDisappearedOnItsOwn();
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Touch/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("MupApps.MvvmCross.Plugins.ControlsNavigation.Touch")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("MupApps.MvvmCross.Plugins.ControlsNavigation.Touch")]
17 | [assembly: AssemblyCopyright("Copyright © 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // Setting ComVisible to false makes the types in this assembly not visible
22 | // to COM components. If you need to access a type in this assembly from
23 | // COM, set the ComVisible attribute to true on that type.
24 | [assembly: ComVisible(false)]
25 |
26 | // The following GUID is for the ID of the typelib if this project is exposed to COM
27 | [assembly: Guid("9fb6a3d3-670d-4bee-ba16-6f3449e371d9")]
28 |
29 | // Version information for an assembly consists of the following four values:
30 | //
31 | // Major Version
32 | // Minor Version
33 | // Build Number
34 | // Revision
35 | //
36 | // You can specify all the values or you can default the Build and Revision Numbers
37 | // by using the '*' as shown below:
38 | // [assembly: AssemblyVersion("1.0.*")]
39 | [assembly: AssemblyVersion("1.0.0.0")]
40 | [assembly: AssemblyFileVersion("1.0.0.0")]
41 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Touch/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone/MvxPhoneControlPresenter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Cirrious.MvvmCross.Views;
7 | using Cirrious.MvvmCross.WindowsPhone.Views;
8 |
9 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone
10 | {
11 | public class MvxPhoneControlPresenter: MvxControlPresenter, IMvxPhoneViewPresenter
12 | {
13 | public MvxPhoneControlPresenter(IMvxViewPresenter viewPresenter)
14 | : base(viewPresenter)
15 | {
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone/Plugin.cs:
--------------------------------------------------------------------------------
1 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone
2 | {
3 | public class Plugin : ControlsNavigation.Plugin
4 | {
5 | }
6 |
7 | }
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using System.Resources;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 | [assembly: Guid("adee8855-21d1-46f8-8dcc-61ea57303082")]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Revision and Build Numbers
34 | // by using the '*' as shown below:
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 | [assembly: NeutralResourcesLanguageAttribute("en-US")]
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore/MvxStoreControlPresenter.cs:
--------------------------------------------------------------------------------
1 | // MvxStoreControlPresenter.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.Views;
7 | using Cirrious.MvvmCross.WindowsCommon.Views;
8 |
9 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore
10 | {
11 | public class MvxStoreControlPresenter
12 | : MvxControlPresenter, IMvxWindowsViewPresenter
13 | {
14 | public MvxStoreControlPresenter(IMvxViewPresenter viewPresenter) : base(viewPresenter)
15 | {
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore/Plugin.cs:
--------------------------------------------------------------------------------
1 | // Plugin.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore
7 | {
8 | public class Plugin : ControlsNavigation.Plugin
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore")]
17 | [assembly: AssemblyCopyright("Copyright © 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // Version information for an assembly consists of the following four values:
22 | //
23 | // Major Version
24 | // Minor Version
25 | // Build Number
26 | // Revision
27 | //
28 | // You can specify all the values or you can default the Build and Revision Numbers
29 | // by using the '*' as shown below:
30 | // [assembly: AssemblyVersion("1.0.*")]
31 | [assembly: AssemblyVersion("1.0.0.0")]
32 | [assembly: AssemblyFileVersion("1.0.0.0")]
33 | [assembly: ComVisible(false)]
34 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf/MvxWpfControlPresenter.cs:
--------------------------------------------------------------------------------
1 | // MvxStoreControlPresenter.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using MvvmCross.Core.Views;
7 | using MvvmCross.Wpf.Views;
8 |
9 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf
10 | {
11 | public class MvxWpfControlPresenter
12 | : MvxControlPresenter, IMvxWpfViewPresenter
13 | {
14 | public MvxWpfControlPresenter(IMvxViewPresenter viewPresenter) : base(viewPresenter)
15 | {
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf/Plugin.cs:
--------------------------------------------------------------------------------
1 | // Plugin.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf
7 | {
8 | public class Plugin : ControlsNavigation.Plugin
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf")]
13 | [assembly: AssemblyCopyright("Copyright © 2013")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e66c5b83-0d05-43cd-aec2-624e5863751a")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/EmptyControlBehaviours.cs:
--------------------------------------------------------------------------------
1 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation
2 | {
3 | public enum EmptyControlBehaviours
4 | {
5 | None,
6 | Hide,
7 | Disable
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/IMvxControl.cs:
--------------------------------------------------------------------------------
1 | // IMvxControl.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using MvvmCross.Core.ViewModels;
7 | using MvvmCross.Platform.Core;
8 | using System;
9 |
10 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation
11 | {
12 | public interface IMvxControl
13 | : IMvxDataConsumer
14 | {
15 | IMvxViewModel ViewModel { get; set; }
16 |
17 | void ResetControl(Type viewModelType);
18 |
19 | EmptyControlBehaviours EmptyControlBehaviour { get; set; }
20 |
21 | void ChangeVisibility(bool visible);
22 |
23 | void ChangeEnabled(bool enabled);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/IMvxControlFinder.cs:
--------------------------------------------------------------------------------
1 | // IMvxControlFinder.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using MvvmCross.Core.ViewModels;
7 | using System;
8 |
9 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation
10 | {
11 | public interface IMvxControlFinder
12 | {
13 | IMvxControl GetControl(Type viewModelType);
14 |
15 | IMvxControl GetControl(IMvxViewModel viewModelType);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/IMvxControlsContainer.cs:
--------------------------------------------------------------------------------
1 | // IMvxControlsContainer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 |
8 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation
9 | {
10 | public interface IMvxControlsContainer : IMvxControlFinder
11 | {
12 | void Add(IMvxControl control);
13 |
14 | void Remove(IMvxControl control);
15 |
16 | void ClearAll();
17 |
18 | void Reset(Type viewModelType);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/IMvxDataContextChanged.cs:
--------------------------------------------------------------------------------
1 | // IMvxDataContextChanged.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 |
8 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation
9 | {
10 | public interface IMvxDataContextChanged
11 | {
12 | event EventHandler DataContextChanged;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/MvxControlExtensions.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation
3 | {
4 | public static class MvxControlExtensions
5 | {
6 | public static EmptyControlBehaviours GetDefaultEmptyControlBehaviour(this IMvxControl control)
7 | {
8 | return EmptyControlBehaviours.Hide;
9 | }
10 |
11 | public static void CheckEmptyControlBehaviour(this IMvxControl control)
12 | {
13 | control.CheckEmptyControlBehaviour(null);
14 | }
15 |
16 | public static void CheckEmptyControlBehaviour(this IMvxControl control, EmptyControlBehaviours? lastBehaviour)
17 | {
18 | if ((lastBehaviour.HasValue && lastBehaviour == EmptyControlBehaviours.Hide)
19 | || (control.EmptyControlBehaviour == EmptyControlBehaviours.Hide && control.ViewModel != null))
20 | control.ChangeVisibility(true);
21 |
22 | if ((lastBehaviour.HasValue && lastBehaviour == EmptyControlBehaviours.Disable)
23 | || (control.EmptyControlBehaviour == EmptyControlBehaviours.Disable && control.ViewModel != null))
24 | control.ChangeVisibility(true);
25 |
26 | if (control.ViewModel == null)
27 | {
28 | if (control.EmptyControlBehaviour == EmptyControlBehaviours.Hide)
29 | control.ChangeVisibility(false);
30 | else if (control.EmptyControlBehaviour == EmptyControlBehaviours.Disable)
31 | control.ChangeEnabled(false);
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/Plugin.cs:
--------------------------------------------------------------------------------
1 | // Plugin.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using MvvmCross.Platform;
7 | using MvvmCross.Platform.Plugins;
8 |
9 | namespace MupApps.MvvmCross.Plugins.ControlsNavigation
10 | {
11 | public class Plugin : IMvxPlugin
12 | {
13 | public virtual void Load()
14 | {
15 | var container = new MvxControlsContainer();
16 | Mvx.RegisterSingleton(container);
17 | Mvx.RegisterSingleton(container);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/PluginLoader.cs:
--------------------------------------------------------------------------------
1 | // PluginLoader.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using MvvmCross.Platform;
7 | using MvvmCross.Platform.Plugins;
8 |
9 | namespace MupApps.MvvmCross.Plugins.TabletNavigation
10 | {
11 | public class PluginLoader : IMvxPluginLoader
12 | {
13 | public void EnsureLoaded()
14 | {
15 | var manager = Mvx.Resolve();
16 | manager.EnsurePlatformAdaptionLoaded();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Resources;
7 | using System.Reflection;
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("MupApps.MvvmCross.Plugins.ControlsNavigation")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("MupApps.MvvmCross.Plugins.ControlsNavigation")]
17 | [assembly: AssemblyCopyright("Copyright © 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 | [assembly: NeutralResourcesLanguage("en")]
21 |
22 | // Version information for an assembly consists of the following four values:
23 | //
24 | // Major Version
25 | // Minor Version
26 | // Build Number
27 | // Revision
28 | //
29 | // You can specify all the values or you can default the Build and Revision Numbers
30 | // by using the '*' as shown below:
31 | // [assembly: AssemblyVersion("1.0.*")]
32 | [assembly: AssemblyVersion("1.0.0.0")]
33 | [assembly: AssemblyFileVersion("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/MupApps.MvvmCross.Plugins.ControlsNavigation/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/App.cs:
--------------------------------------------------------------------------------
1 | // App.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.CrossCore.IoC;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.Core
9 | {
10 | public class App : Cirrious.MvvmCross.ViewModels.MvxApplication
11 | {
12 | public override void Initialize()
13 | {
14 | CreatableTypes()
15 | .EndingWith("Service")
16 | .AsInterfaces()
17 | .RegisterAsLazySingleton();
18 |
19 | RegisterAppStart();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/Model/Folder.cs:
--------------------------------------------------------------------------------
1 | // Folder.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | namespace MupApps.ControlsNavigation.Sample.Core.Model
7 | {
8 | public class Folder
9 | {
10 | public string Name
11 | {
12 | get;
13 | set;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/Model/Mail.cs:
--------------------------------------------------------------------------------
1 | // Mail.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | namespace MupApps.ControlsNavigation.Sample.Core.Model
7 | {
8 | public class Mail
9 | {
10 | public int Id
11 | {
12 | get;
13 | set;
14 | }
15 |
16 | public string Date
17 | {
18 | get;
19 | set;
20 | }
21 |
22 | public string From
23 | {
24 | get;
25 | set;
26 | }
27 |
28 | public string To
29 | {
30 | get;
31 | set;
32 | }
33 |
34 | public string Subject
35 | {
36 | get;
37 | set;
38 | }
39 |
40 | public string Body
41 | {
42 | get;
43 | set;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Resources;
7 | using System.Reflection;
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("MupApps.ControlsNavigation.Sample.Core")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("MupApps.ControlsNavigation.Sample.Core")]
17 | [assembly: AssemblyCopyright("Copyright © 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 | [assembly: NeutralResourcesLanguage("en")]
21 |
22 | // Version information for an assembly consists of the following four values:
23 | //
24 | // Major Version
25 | // Minor Version
26 | // Build Number
27 | // Revision
28 | //
29 | // You can specify all the values or you can default the Build and Revision Numbers
30 | // by using the '*' as shown below:
31 | // [assembly: AssemblyVersion("1.0.*")]
32 | [assembly: AssemblyVersion("1.0.0.0")]
33 | [assembly: AssemblyFileVersion("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/Services/IMailBoxService.cs:
--------------------------------------------------------------------------------
1 | // IMailBoxService.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Collections.Generic;
7 | using System.Threading.Tasks;
8 | using MupApps.ControlsNavigation.Sample.Core.Model;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.Core.Services
11 | {
12 | public interface IMailBoxService
13 | {
14 | List GetFolders();
15 |
16 | Task> GetMailsAsync(string folder);
17 |
18 | Task GetMailAsync(int mailId);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/ViewModels/FirstViewModel.cs:
--------------------------------------------------------------------------------
1 | using Cirrious.MvvmCross.ViewModels;
2 |
3 | namespace MupApps.ControlsNavigation.Sample.Core.ViewModels
4 | {
5 | public class FirstViewModel
6 | : MvxViewModel
7 | {
8 | private string _hello = "Hello MvvmCross";
9 | public string Hello
10 | {
11 | get { return _hello; }
12 | set { _hello = value; RaisePropertyChanged(() => Hello); }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/ViewModels/FolderViewModel.cs:
--------------------------------------------------------------------------------
1 | // FolderViewModel.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Collections.Generic;
7 | using Cirrious.MvvmCross.ViewModels;
8 | using MupApps.ControlsNavigation.Sample.Core.Model;
9 | using MupApps.ControlsNavigation.Sample.Core.Services;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.Core.ViewModels
12 | {
13 | public class FolderViewModel : MvxViewModel
14 | {
15 | private readonly IMailBoxService _mailBoxService;
16 |
17 | public FolderViewModel(IMailBoxService mailBoxService)
18 | {
19 | _mailBoxService = mailBoxService;
20 | }
21 |
22 | private Folder _folder;
23 | public Folder Folder
24 | {
25 | get { return _folder; }
26 | set
27 | {
28 | _folder = value;
29 | RaisePropertyChanged(() => Folder);
30 | }
31 | }
32 |
33 | private Mail _selectedMail;
34 | public Mail SelectedMail
35 | {
36 | get { return _selectedMail; }
37 | set
38 | {
39 | _selectedMail = value;
40 | RaisePropertyChanged(() => SelectedMail);
41 | if (_selectedMail != null)
42 | ShowViewModel(_selectedMail);
43 | }
44 | }
45 |
46 | private List _mails;
47 | public List Mails
48 | {
49 | get { return _mails; }
50 | set { _mails = value; RaisePropertyChanged(() => Mails); }
51 | }
52 |
53 | public async void Init(Folder folder)
54 | {
55 | Folder = folder;
56 | Mails = await _mailBoxService.GetMailsAsync(folder.Name);
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/ViewModels/FoldersViewModel.cs:
--------------------------------------------------------------------------------
1 | // FoldersViewModel.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Collections.Generic;
7 | using Cirrious.MvvmCross.ViewModels;
8 | using MupApps.ControlsNavigation.Sample.Core.Model;
9 | using MupApps.ControlsNavigation.Sample.Core.Services;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.Core.ViewModels
12 | {
13 | public class FoldersViewModel : MvxViewModel
14 | {
15 | private readonly IMailBoxService _mailBoxService;
16 |
17 | public FoldersViewModel(IMailBoxService mailBoxService)
18 | {
19 | _mailBoxService = mailBoxService;
20 | }
21 |
22 | private Folder _selectedFolder;
23 | public Folder SelectedFolder
24 | {
25 | get { return _selectedFolder; }
26 | set
27 | {
28 | _selectedFolder = value;
29 | RaisePropertyChanged(() => SelectedFolder);
30 | if (_selectedFolder != null)
31 | ShowViewModel(_selectedFolder);
32 | }
33 | }
34 |
35 | private List _folders;
36 | public List Folders
37 | {
38 | get { return _folders; }
39 | set { _folders = value; RaisePropertyChanged(() => Folders); }
40 | }
41 |
42 | public void Init()
43 | {
44 | Folders = _mailBoxService.GetFolders();
45 | }
46 |
47 | public IMvxCommand NavigateToSettingsCommand
48 | {
49 | get
50 | {
51 | return new MvxCommand(() => ShowViewModel());
52 | }
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/ViewModels/MailViewModel.cs:
--------------------------------------------------------------------------------
1 | // MailViewModel.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.ViewModels;
7 | using MupApps.ControlsNavigation.Sample.Core.Model;
8 | using MupApps.ControlsNavigation.Sample.Core.Services;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.Core.ViewModels
11 | {
12 | public class MailViewModel : MvxViewModel
13 | {
14 | private readonly IMailBoxService _mailBoxService;
15 |
16 | public MailViewModel(IMailBoxService mailBoxService)
17 | {
18 | _mailBoxService = mailBoxService;
19 | }
20 |
21 | private Mail _mail;
22 | public Mail Mail
23 | {
24 | get { return _mail; }
25 | set { _mail = value; RaisePropertyChanged(() => Mail); }
26 | }
27 |
28 | public async void Init(Mail mail)
29 | {
30 | Mail = await _mailBoxService.GetMailAsync(mail.Id);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/ViewModels/SettingsViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Cirrious.MvvmCross.ViewModels;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.Core.ViewModels
9 | {
10 | public class SettingsViewModel : MvxViewModel
11 | {
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Core/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.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 you 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");
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/DebugTrace.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Cirrious.CrossCore.Platform;
4 |
5 | namespace MupApps.ControlsNavigation.Sample.Droid
6 | {
7 | public class DebugTrace : IMvxTrace
8 | {
9 | public void Trace(MvxTraceLevel level, string tag, Func message)
10 | {
11 | Debug.WriteLine(tag + ":" + level + ":" + message());
12 | }
13 |
14 | public void Trace(MvxTraceLevel level, string tag, string message)
15 | {
16 | Debug.WriteLine(tag + ":" + level + ":" + message);
17 | }
18 |
19 | public void Trace(MvxTraceLevel level, string tag, string message, params object[] args)
20 | {
21 | try
22 | {
23 | Debug.WriteLine(string.Format(tag + ":" + level + ":" + message, args));
24 | }
25 | catch (FormatException)
26 | {
27 | Trace(MvxTraceLevel.Error, tag, "Exception during trace of {0} {1}", level, message);
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 | using Android.App;
9 |
10 | // General Information about an assembly is controlled through the following
11 | // set of attributes. Change these attribute values to modify the information
12 | // associated with an assembly.
13 | [assembly: AssemblyTitle("MupApps.ControlsNavigation.Sample.Droid")]
14 | [assembly: AssemblyDescription("")]
15 | [assembly: AssemblyConfiguration("")]
16 | [assembly: AssemblyCompany("")]
17 | [assembly: AssemblyProduct("MupApps.ControlsNavigation.Sample.Droid")]
18 | [assembly: AssemblyCopyright("Copyright © 2013")]
19 | [assembly: AssemblyTrademark("")]
20 | [assembly: AssemblyCulture("")]
21 | [assembly: ComVisible(false)]
22 |
23 | // Version information for an assembly consists of the following four values:
24 | //
25 | // Major Version
26 | // Minor Version
27 | // Build Number
28 | // Revision
29 | //
30 | // You can specify all the values or you can default the Build and Revision Numbers
31 | // by using the '*' as shown below:
32 | // [assembly: AssemblyVersion("1.0.*")]
33 | [assembly: AssemblyVersion("1.0.0.0")]
34 | [assembly: AssemblyFileVersion("1.0.0.0")]
35 |
36 | // Add some common permissions, these can be removed if not needed
37 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
38 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
39 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.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.xml),
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-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Drawable/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Drawable/Icon.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Drawable/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Drawable/splash.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Layout/FirstView.axml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
13 |
19 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Layout/ItemTemplate_Folder.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
17 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Layout/ItemTemplate_Mail.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
21 |
29 |
30 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Layout/SplashScreen.axml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Layout/View_Folder.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
18 |
23 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Layout/View_Folders.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
18 |
23 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Layout/View_Mail.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
15 |
22 |
30 |
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Layout/View_Mails.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
15 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Values/MvxBindingAttributes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Values/SplashStyle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Resources/Values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, Click Me!
4 | MupApps.ControlsNavigation.Sample.Droid
5 |
6 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Setup.cs:
--------------------------------------------------------------------------------
1 | // Setup.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.Content;
7 | using Cirrious.CrossCore.Platform;
8 | using Cirrious.MvvmCross.Droid.Platform;
9 | using Cirrious.MvvmCross.ViewModels;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.Droid
12 | {
13 | public class Setup : MvxAndroidSetup
14 | {
15 | public Setup(Context applicationContext) : base(applicationContext)
16 | {
17 | }
18 |
19 | protected override IMvxApplication CreateApp()
20 | {
21 | return new Core.App();
22 | }
23 |
24 | protected override IMvxTrace CreateDebugTrace()
25 | {
26 | return new DebugTrace();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/SplashScreen.cs:
--------------------------------------------------------------------------------
1 | // SplashScreen.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.App;
7 | using Android.Content.PM;
8 | using Cirrious.MvvmCross.Droid.Views;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.Droid
11 | {
12 | [Activity(
13 | Label = "MupApps.ControlsNavigation.Sample.Droid"
14 | , MainLauncher = true
15 | , Icon = "@drawable/icon"
16 | , Theme = "@style/Theme.Splash"
17 | , NoHistory = true
18 | , ScreenOrientation = ScreenOrientation.Portrait)]
19 | public class SplashScreen : MvxSplashScreenActivity
20 | {
21 | public SplashScreen()
22 | : base(Resource.Layout.SplashScreen)
23 | {
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Views/FolderView.cs:
--------------------------------------------------------------------------------
1 | // FolderView.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.App;
7 | using Android.OS;
8 | using Cirrious.MvvmCross.Droid.Views;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.Droid.Views
11 | {
12 | [Activity(Label = "")]
13 | public class FolderView : MvxActivity
14 | {
15 | protected override void OnCreate(Bundle bundle)
16 | {
17 | base.OnCreate(bundle);
18 | SetContentView(Resource.Layout.View_Folder);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Views/FoldersView.cs:
--------------------------------------------------------------------------------
1 | // FoldersView.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.App;
7 | using Android.OS;
8 | using Cirrious.MvvmCross.Droid.Views;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.Droid.Views
11 | {
12 | [Activity(Label = "")]
13 | public class FoldersView : MvxActivity
14 | {
15 | protected override void OnCreate(Bundle bundle)
16 | {
17 | base.OnCreate(bundle);
18 | SetContentView(Resource.Layout.View_Folders);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/Views/MailView.cs:
--------------------------------------------------------------------------------
1 | // MailView.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.App;
7 | using Android.OS;
8 | using Cirrious.MvvmCross.Droid.Views;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.Droid.Views
11 | {
12 | [Activity(Label = "")]
13 | public class MailView : MvxActivity
14 | {
15 | protected override void OnCreate(Bundle bundle)
16 | {
17 | base.OnCreate(bundle);
18 | SetContentView(Resource.Layout.View_Mail);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/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 you 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");
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Controls/FolderControl.cs:
--------------------------------------------------------------------------------
1 | // FolderControl.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.Content;
7 | using Android.Util;
8 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
9 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Droid;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.DroidTablet.Controls
12 | {
13 | public class FolderControl : MvxAndroidControl
14 | {
15 | public FolderControl(Context context) : base(context)
16 | {
17 | Initialize();
18 | }
19 |
20 | public FolderControl(Context context, IAttributeSet attrs) : base(context, attrs)
21 | {
22 | Initialize();
23 | }
24 |
25 | public FolderControl(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
26 | {
27 | Initialize();
28 | }
29 |
30 | private void Initialize()
31 | {
32 | SetContentView(Resource.Layout.View_Folder);
33 | }
34 |
35 | protected override void OnDataContextChanged()
36 | {
37 | base.OnDataContextChanged();
38 | ResetControl(typeof(MailViewModel));
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Controls/MailControl.cs:
--------------------------------------------------------------------------------
1 | // MailControl.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.Content;
7 | using Android.Util;
8 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Droid;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.DroidTablet.Controls
11 | {
12 | public class MailControl : MvxAndroidControl
13 | {
14 | public MailControl(Context context) : base(context)
15 | {
16 | Initialize();
17 | }
18 |
19 | public MailControl(Context context, IAttributeSet attrs) : base(context, attrs)
20 | {
21 | Initialize();
22 | }
23 |
24 | public MailControl(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
25 | {
26 | Initialize();
27 | }
28 |
29 | private void Initialize()
30 | {
31 | SetContentView(Resource.Layout.View_Mail);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/DebugTrace.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Cirrious.CrossCore.Platform;
4 |
5 | namespace MupApps.ControlsNavigation.Sample.DroidTablet
6 | {
7 | public class DebugTrace : IMvxTrace
8 | {
9 | public void Trace(MvxTraceLevel level, string tag, Func message)
10 | {
11 | Debug.WriteLine(tag + ":" + level + ":" + message());
12 | }
13 |
14 | public void Trace(MvxTraceLevel level, string tag, string message)
15 | {
16 | Debug.WriteLine(tag + ":" + level + ":" + message);
17 | }
18 |
19 | public void Trace(MvxTraceLevel level, string tag, string message, params object[] args)
20 | {
21 | try
22 | {
23 | Debug.WriteLine(string.Format(tag + ":" + level + ":" + message, args));
24 | }
25 | catch (FormatException)
26 | {
27 | Trace(MvxTraceLevel.Error, tag, "Exception during trace of {0} {1}", level, message);
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 | using Android.App;
9 |
10 | // General Information about an assembly is controlled through the following
11 | // set of attributes. Change these attribute values to modify the information
12 | // associated with an assembly.
13 | [assembly: AssemblyTitle("MupApps.ControlsNavigation.Sample.DroidTablet")]
14 | [assembly: AssemblyDescription("")]
15 | [assembly: AssemblyConfiguration("")]
16 | [assembly: AssemblyCompany("")]
17 | [assembly: AssemblyProduct("MupApps.ControlsNavigation.Sample.DroidTablet")]
18 | [assembly: AssemblyCopyright("Copyright © 2013")]
19 | [assembly: AssemblyTrademark("")]
20 | [assembly: AssemblyCulture("")]
21 | [assembly: ComVisible(false)]
22 |
23 | // Version information for an assembly consists of the following four values:
24 | //
25 | // Major Version
26 | // Minor Version
27 | // Build Number
28 | // Revision
29 | //
30 | // You can specify all the values or you can default the Build and Revision Numbers
31 | // by using the '*' as shown below:
32 | // [assembly: AssemblyVersion("1.0.*")]
33 | [assembly: AssemblyVersion("1.0.0.0")]
34 | [assembly: AssemblyFileVersion("1.0.0.0")]
35 |
36 | // Add some common permissions, these can be removed if not needed
37 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
38 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
39 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/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.xml),
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-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Drawable/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Drawable/Icon.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Drawable/Settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Drawable/Settings.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Drawable/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Drawable/splash.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Layout/FirstView.axml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
13 |
19 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Layout/ItemTemplate_Folder.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
17 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Layout/ItemTemplate_Mail.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
21 |
29 |
30 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Layout/SplashScreen.axml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Layout/View_Folder.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
18 |
23 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Layout/View_Folders.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
22 |
28 |
29 |
33 |
37 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Layout/View_Mail.axml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
15 |
22 |
30 |
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Layout/View_Settings.axml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Values/MvxBindingAttributes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Values/SplashStyle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Resources/Values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, Click Me!
4 | MupApps.ControlsNavigation.Sample.DroidTablet
5 |
6 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Setup.cs:
--------------------------------------------------------------------------------
1 | // Setup.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.Content;
7 | using Cirrious.CrossCore.Platform;
8 | using Cirrious.MvvmCross.Droid.Platform;
9 | using Cirrious.MvvmCross.Droid.Views;
10 | using Cirrious.MvvmCross.ViewModels;
11 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Droid;
12 |
13 | namespace MupApps.ControlsNavigation.Sample.DroidTablet
14 | {
15 | public class Setup : MvxAndroidSetup
16 | {
17 | public Setup(Context applicationContext) : base(applicationContext)
18 | {
19 | }
20 |
21 | protected override IMvxApplication CreateApp()
22 | {
23 | return new Core.App();
24 | }
25 |
26 | protected override IMvxTrace CreateDebugTrace()
27 | {
28 | return new DebugTrace();
29 | }
30 |
31 | protected override IMvxAndroidViewPresenter CreateViewPresenter()
32 | {
33 | var viewPresenter = base.CreateViewPresenter();
34 | return new MvxAndroidControlPresenter(viewPresenter);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/SplashScreen.cs:
--------------------------------------------------------------------------------
1 | // SplashScreen.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Android.App;
7 | using Android.Content.PM;
8 | using Cirrious.MvvmCross.Droid.Views;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.DroidTablet
11 | {
12 | [Activity(
13 | Label = "MupApps.ControlsNavigation.Sample.DroidTablet"
14 | , MainLauncher = true
15 | , Icon = "@drawable/icon"
16 | , Theme = "@style/Theme.Splash"
17 | , NoHistory = true
18 | , ScreenOrientation = ScreenOrientation.Portrait)]
19 | public class SplashScreen : MvxSplashScreenActivity
20 | {
21 | public SplashScreen()
22 | : base(Resource.Layout.SplashScreen)
23 | {
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Views/FoldersView.cs:
--------------------------------------------------------------------------------
1 | // FoldersView.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Linq;
7 | using Android.App;
8 | using Android.Content.PM;
9 | using Android.OS;
10 | using Cirrious.MvvmCross.Droid.Views;
11 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
12 |
13 | namespace MupApps.ControlsNavigation.Sample.DroidTablet.Views
14 | {
15 | [Activity(Label = "", ScreenOrientation = ScreenOrientation.Landscape, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden)]
16 | public class FoldersView : MvxActivity
17 | {
18 | protected override void OnCreate(Bundle bundle)
19 | {
20 | base.OnCreate(bundle);
21 | SetContentView(Resource.Layout.View_Folders);
22 |
23 | //As the folder is also showed on this view, we don't wait for the user to select one
24 | ((FoldersViewModel)ViewModel).SelectedFolder = ((FoldersViewModel)ViewModel).Folders.FirstOrDefault();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/Views/SettingsView.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.OS;
3 | using Cirrious.MvvmCross.Droid.Views;
4 |
5 | namespace MupApps.ControlsNavigation.Sample.DroidTablet.Views
6 | {
7 | [Activity(Label = "Settings")]
8 | public class SettingsView : MvxActivity
9 | {
10 | protected override void OnCreate(Bundle bundle)
11 | {
12 | base.OnCreate(bundle);
13 | SetContentView(Resource.Layout.View_Settings);
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.DroidTablet/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | // AppDelegate.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 | using UIKit;
8 | using Cirrious.CrossCore;
9 | using Cirrious.MvvmCross.Touch.Platform;
10 | using Cirrious.MvvmCross.ViewModels;
11 |
12 | namespace MupApps.ControlsNavigation.Sample.IPad
13 | {
14 | [Register("AppDelegate")]
15 | public partial class AppDelegate : MvxApplicationDelegate
16 | {
17 | UIWindow _window;
18 |
19 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
20 | {
21 | _window = new UIWindow(UIScreen.MainScreen.Bounds);
22 |
23 | var setup = new Setup(this, _window);
24 | setup.Initialize();
25 |
26 | var startup = Mvx.Resolve();
27 | startup.Start();
28 |
29 | _window.MakeKeyAndVisible();
30 |
31 | return true;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/CellTemplates/FolderCellTemplate.cs:
--------------------------------------------------------------------------------
1 | // FolderCellTemplate.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 | using Foundation;
8 | using UIKit;
9 | using Cirrious.MvvmCross.Binding.BindingContext;
10 | using Cirrious.MvvmCross.Binding.Touch.Views;
11 | using MupApps.ControlsNavigation.Sample.Core.Model;
12 |
13 | namespace MupApps.ControlsNavigation.Sample.IPad
14 | {
15 | public partial class FolderCellTemplate : MvxTableViewCell
16 | {
17 | public static readonly UINib Nib = UINib.FromName ("FolderCellTemplate", NSBundle.MainBundle);
18 | public static readonly NSString Key = new NSString ("FolderCellTemplate");
19 |
20 | public FolderCellTemplate (IntPtr handle) : base (handle)
21 | {
22 | this.DelayBind(() => {
23 | var set = this.CreateBindingSet();
24 | set.Bind(FolderLabel).To(folder => folder.Name);
25 | set.Apply ();
26 | });
27 | }
28 |
29 | public static FolderCellTemplate Create ()
30 | {
31 | return (FolderCellTemplate)Nib.Instantiate (null, null) [0];
32 | }
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/CellTemplates/FolderCellTemplate.designer.cs:
--------------------------------------------------------------------------------
1 | // FolderCellTemplate.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPad
9 | {
10 | [Register ("FolderCellTemplate")]
11 | partial class FolderCellTemplate
12 | {
13 | [Outlet]
14 | UIKit.UILabel FolderLabel { get; set; }
15 |
16 | void ReleaseDesignerOutlets ()
17 | {
18 | if (FolderLabel != null) {
19 | FolderLabel.Dispose ();
20 | FolderLabel = null;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/CellTemplates/MailCellTemplate.cs:
--------------------------------------------------------------------------------
1 | // MailCellTemplate.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 | using Foundation;
8 | using UIKit;
9 | using Cirrious.MvvmCross.Binding.BindingContext;
10 | using Cirrious.MvvmCross.Binding.Touch.Views;
11 | using MupApps.ControlsNavigation.Sample.Core.Model;
12 |
13 | namespace MupApps.ControlsNavigation.Sample.IPad
14 | {
15 | public partial class MailCellTemplate : MvxTableViewCell
16 | {
17 | public static readonly UINib Nib = UINib.FromName ("MailCellTemplate", NSBundle.MainBundle);
18 | public static readonly NSString Key = new NSString ("MailCellTemplate");
19 |
20 | public MailCellTemplate (IntPtr handle) : base (handle)
21 | {
22 | this.DelayBind(() => {
23 | var set = this.CreateBindingSet();
24 | set.Bind(FromLabel).To(folder => folder.From);
25 | set.Bind(SubjectLabel).To(folder => folder.Subject);
26 | set.Bind(DateLabel).To(folder => folder.Date);
27 | set.Apply ();
28 | });
29 | }
30 |
31 | public static MailCellTemplate Create ()
32 | {
33 | return (MailCellTemplate)Nib.Instantiate (null, null) [0];
34 | }
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/CellTemplates/MailCellTemplate.designer.cs:
--------------------------------------------------------------------------------
1 | // MailCellTemplate.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPad
9 | {
10 | [Register ("MailCellTemplate")]
11 | partial class MailCellTemplate
12 | {
13 | [Outlet]
14 | UIKit.UILabel DateLabel { get; set; }
15 |
16 | [Outlet]
17 | UIKit.UILabel FromLabel { get; set; }
18 |
19 | [Outlet]
20 | UIKit.UILabel SubjectLabel { get; set; }
21 |
22 | void ReleaseDesignerOutlets ()
23 | {
24 | if (FromLabel != null) {
25 | FromLabel.Dispose ();
26 | FromLabel = null;
27 | }
28 |
29 | if (SubjectLabel != null) {
30 | SubjectLabel.Dispose ();
31 | SubjectLabel = null;
32 | }
33 |
34 | if (DateLabel != null) {
35 | DateLabel.Dispose ();
36 | DateLabel = null;
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Controls/FolderControl.cs:
--------------------------------------------------------------------------------
1 | // FolderControl.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.Binding.BindingContext;
7 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
8 | using Cirrious.MvvmCross.Binding.Touch.Views;
9 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Touch;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.IPad
12 | {
13 | public partial class FolderControl : MvxTouchControl
14 | {
15 | public FolderControl () : base ("FolderControl", null)
16 | {
17 | }
18 |
19 | public override void DidReceiveMemoryWarning ()
20 | {
21 | // Releases the view if it doesn't have a superview.
22 | base.DidReceiveMemoryWarning ();
23 |
24 | // Release any cached data, images, etc that aren't in use.
25 | }
26 |
27 | public override void ViewDidLoad ()
28 | {
29 | base.ViewDidLoad ();
30 |
31 | var source = new MvxSimpleTableViewSource(MailsTable, MailCellTemplate.Key, MailCellTemplate.Key);
32 | MailsTable.Source = source;
33 |
34 | var set = this.CreateBindingSet();
35 | set.Bind(source).To (vm => vm.Mails);
36 | set.Bind(source).For(s => s.SelectedItem).To (vm => vm.SelectedMail);
37 | set.Apply ();
38 | }
39 |
40 | protected override void OnDataContextChanged ()
41 | {
42 | base.OnDataContextChanged ();
43 | ResetControl (typeof(MailViewModel));
44 | }
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Controls/FolderControl.designer.cs:
--------------------------------------------------------------------------------
1 | // FolderControl.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPad
9 | {
10 | [Register ("FolderControl")]
11 | partial class FolderControl
12 | {
13 | [Outlet]
14 | UIKit.UITableView MailsTable { get; set; }
15 |
16 | void ReleaseDesignerOutlets ()
17 | {
18 | if (MailsTable != null) {
19 | MailsTable.Dispose ();
20 | MailsTable = null;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Controls/MailControl.cs:
--------------------------------------------------------------------------------
1 | // MailControl.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.Binding.BindingContext;
7 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
8 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Touch;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.IPad
11 | {
12 | public partial class MailControl : MvxTouchControl
13 | {
14 | public MailControl () : base ("MailControl", null)
15 | {
16 | }
17 |
18 | public override void DidReceiveMemoryWarning ()
19 | {
20 | // Releases the view if it doesn't have a superview.
21 | base.DidReceiveMemoryWarning ();
22 |
23 | // Release any cached data, images, etc that aren't in use.
24 | }
25 |
26 | public override void ViewDidLoad ()
27 | {
28 | base.ViewDidLoad ();
29 |
30 | var set = this.CreateBindingSet();
31 | set.Bind(FromLabel).To (vm => vm.Mail.From);
32 | set.Bind(ToLabel).To (vm => vm.Mail.To);
33 | set.Bind(SubjectLabel).To (vm => vm.Mail.Subject);
34 | set.Bind(BodyLabel).To (vm => vm.Mail.Body);
35 | set.Bind(DateLabel).To (vm => vm.Mail.Date);
36 | set.Apply ();
37 | }
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Controls/MailControl.designer.cs:
--------------------------------------------------------------------------------
1 | // MailControl.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPad
9 | {
10 | [Register ("MailControl")]
11 | partial class MailControl
12 | {
13 | [Outlet]
14 | UIKit.UILabel BodyLabel { get; set; }
15 |
16 | [Outlet]
17 | UIKit.UILabel DateLabel { get; set; }
18 |
19 | [Outlet]
20 | UIKit.UILabel FromLabel { get; set; }
21 |
22 | [Outlet]
23 | UIKit.UILabel SubjectLabel { get; set; }
24 |
25 | [Outlet]
26 | UIKit.UILabel ToLabel { get; set; }
27 |
28 | void ReleaseDesignerOutlets ()
29 | {
30 | if (FromLabel != null) {
31 | FromLabel.Dispose ();
32 | FromLabel = null;
33 | }
34 |
35 | if (ToLabel != null) {
36 | ToLabel.Dispose ();
37 | ToLabel = null;
38 | }
39 |
40 | if (SubjectLabel != null) {
41 | SubjectLabel.Dispose ();
42 | SubjectLabel = null;
43 | }
44 |
45 | if (BodyLabel != null) {
46 | BodyLabel.Dispose ();
47 | BodyLabel = null;
48 | }
49 |
50 | if (DateLabel != null) {
51 | DateLabel.Dispose ();
52 | DateLabel = null;
53 | }
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/DebugTrace.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Cirrious.CrossCore.Platform;
4 |
5 | namespace MupApps.ControlsNavigation.Sample.IPad
6 | {
7 | public class DebugTrace : IMvxTrace
8 | {
9 | public void Trace(MvxTraceLevel level, string tag, Func message)
10 | {
11 | Debug.WriteLine(tag + ":" + level + ":" + message());
12 | }
13 |
14 | public void Trace(MvxTraceLevel level, string tag, string message)
15 | {
16 | Debug.WriteLine(tag + ":" + level + ":" + message);
17 | }
18 |
19 | public void Trace(MvxTraceLevel level, string tag, string message, params object[] args)
20 | {
21 | try
22 | {
23 | Debug.WriteLine(string.Format(tag + ":" + level + ":" + message, args));
24 | }
25 | catch (FormatException)
26 | {
27 | Trace(MvxTraceLevel.Error, tag, "Exception during trace of {0} {1}", level, message);
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 2
8 |
9 | UISupportedInterfaceOrientations
10 |
11 | UIInterfaceOrientationPortrait
12 | UIInterfaceOrientationLandscapeLeft
13 | UIInterfaceOrientationLandscapeRight
14 |
15 | MinimumOSVersion
16 | 7.0
17 | CFBundleDisplayName
18 | MailApp iPad
19 | CFBundleIdentifier
20 | MupApps.ControlsNavigation.Sample.IPad
21 | CFBundleVersion
22 | 1.0
23 | NSMainNibFile
24 |
25 | UISupportedInterfaceOrientations~ipad
26 |
27 | UIInterfaceOrientationLandscapeLeft
28 | UIInterfaceOrientationLandscapeRight
29 |
30 | CFBundleShortVersionString
31 | 1.0
32 |
33 |
34 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Main.cs:
--------------------------------------------------------------------------------
1 | // Main.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using UIKit;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPad
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("MupApps.ControlsNavigation.Sample.IPad")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("MupApps.ControlsNavigation.Sample.IPad")]
17 | [assembly: AssemblyCopyright("Copyright © 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // Setting ComVisible to false makes the types in this assembly not visible
22 | // to COM components. If you need to access a type in this assembly from
23 | // COM, set the ComVisible attribute to true on that type.
24 | [assembly: ComVisible(false)]
25 |
26 | // The following GUID is for the ID of the typelib if this project is exposed to COM
27 | [assembly: Guid("16f91f60-ee0a-4bc4-8ead-4a94da2b9b32")]
28 |
29 | // Version information for an assembly consists of the following four values:
30 | //
31 | // Major Version
32 | // Minor Version
33 | // Build Number
34 | // Revision
35 | //
36 | // You can specify all the values or you can default the Build and Revision Numbers
37 | // by using the '*' as shown below:
38 | // [assembly: AssemblyVersion("1.0.*")]
39 | [assembly: AssemblyVersion("1.0.0.0")]
40 | [assembly: AssemblyFileVersion("1.0.0.0")]
41 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Setup.cs:
--------------------------------------------------------------------------------
1 | using Cirrious.CrossCore.Platform;
2 | using Cirrious.MvvmCross.ViewModels;
3 | using Cirrious.MvvmCross.Touch.Platform;
4 | using UIKit;
5 | using Cirrious.MvvmCross.Touch.Views.Presenters;
6 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Touch;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPad
9 | {
10 | public class Setup : MvxTouchSetup
11 | {
12 | public Setup(MvxApplicationDelegate applicationDelegate, UIWindow window)
13 | : base(applicationDelegate, window)
14 | {
15 | }
16 |
17 | protected override IMvxApplication CreateApp()
18 | {
19 | return new Core.App();
20 | }
21 |
22 | protected override IMvxTrace CreateDebugTrace()
23 | {
24 | return new DebugTrace();
25 | }
26 |
27 | protected override IMvxTouchViewPresenter CreatePresenter()
28 | {
29 | var viewPresenter = base.CreatePresenter();
30 | return new MvxTouchControlPresenter(viewPresenter);
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/ToDo-MvvmCross-ControlsNavigation/_ Touch UI.txt:
--------------------------------------------------------------------------------
1 | The steps to get this plugin on Touch UI working are:
2 |
3 | 1. Override the CreatePresenter method on your Setup.cs file:
4 |
5 | protected override IMvxTouchViewPresenter CreatePresenter()
6 | {
7 | var viewPresenter = base.CreatePresenter();
8 | return new MvxTouchControlPresenter(viewPresenter);
9 | }
10 |
11 | 2. Add a new UIViewController to the Controls folder and Inherit from MvxAndroidControl,
12 | with the same name of the ViewModel but ending in Control (Ex: SecondViewModel -> SecondControl)
13 |
14 | 3. Add a UIView to your nib View file from XCode and position it, or add it programmatically to your MvxViewController
15 |
16 | 4. Add your control to that UIView.
17 |
18 | public override void ViewDidLoad ()
19 | {
20 | base.ViewDidLoad ();
21 |
22 | var yourControl = new YourControl();
23 | AddChildViewController(yourControl);
24 | YourUIView.AddSubview(yourControl.View);
25 |
26 | ...
27 | }
28 |
29 | The control will be hidden until ShowViewModel has been called.
30 | You could change that behaviour setting the property EmptyControlBehaviour (None, Hidden, Disabled)
31 |
32 | 5. Call the ShowViewModel method from the container view's ViewModel and the control will do its job!
33 |
34 | You can check a working sample here:
35 | https://github.com/ChristianRuiz/MvvmCross-ControlsNavigation/tree/v1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad
36 |
37 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/ToDo-MvvmCross/_ Touch UI.txt:
--------------------------------------------------------------------------------
1 | The steps to get this Touch UI working are:
2 |
3 | 1. Add a reference to your Core PCL project
4 | 2. Modify AppDelegate.cs to create the new Setup and to call the IMvxAppStart - there is sample code for this in AppDelegate.cs.txt
5 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Views/FoldersView.cs:
--------------------------------------------------------------------------------
1 | // FoldersView.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Linq;
7 | using Cirrious.MvvmCross.Touch.Views;
8 | using Cirrious.MvvmCross.Binding.BindingContext;
9 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
10 | using MupApps.MvvmCross.Plugins.ControlsNavigation;
11 | using Cirrious.MvvmCross.Binding.Touch.Views;
12 |
13 | namespace MupApps.ControlsNavigation.Sample.IPad
14 | {
15 | public partial class FoldersView : MvxViewController
16 | {
17 | public FoldersView () : base ("FoldersView", null)
18 | {
19 | }
20 |
21 | public override void DidReceiveMemoryWarning ()
22 | {
23 | // Releases the view if it doesn't have a superview.
24 | base.DidReceiveMemoryWarning ();
25 |
26 | // Release any cached data, images, etc that aren't in use.
27 | }
28 |
29 | public override void ViewDidLoad ()
30 | {
31 | base.ViewDidLoad ();
32 |
33 | var folderControl = new FolderControl();
34 | AddChildViewController(folderControl);
35 | FolderView.AddSubview(folderControl.View);
36 |
37 | var mailControl = new MailControl();
38 | AddChildViewController(mailControl);
39 | MailView.AddSubview(mailControl.View);
40 |
41 | var source = new MvxSimpleTableViewSource(FoldersTable, FolderCellTemplate.Key, FolderCellTemplate.Key);
42 | FoldersTable.Source = source;
43 |
44 | var set = this.CreateBindingSet();
45 | set.Bind(source).To (vm => vm.Folders);
46 | set.Bind(source).For(s => s.SelectedItem).To (vm => vm.SelectedFolder);
47 | set.Apply ();
48 |
49 | this.Title = "MailApp";
50 |
51 | //As the folder is also showed on this view, we don't wait for the user to select one
52 | ((FoldersViewModel)ViewModel).SelectedFolder = ((FoldersViewModel)ViewModel).Folders.FirstOrDefault();
53 | }
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/Views/FoldersView.designer.cs:
--------------------------------------------------------------------------------
1 | // FoldersView.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPad
9 | {
10 | [Register ("FoldersView")]
11 | partial class FoldersView
12 | {
13 | [Outlet]
14 | UIKit.UITableView FoldersTable { get; set; }
15 |
16 | [Outlet]
17 | UIKit.UIView FolderView { get; set; }
18 |
19 | [Outlet]
20 | UIKit.UIView MailView { get; set; }
21 |
22 | void ReleaseDesignerOutlets ()
23 | {
24 | if (FoldersTable != null) {
25 | FoldersTable.Dispose ();
26 | FoldersTable = null;
27 | }
28 |
29 | if (FolderView != null) {
30 | FolderView.Dispose ();
31 | FolderView = null;
32 | }
33 |
34 | if (MailView != null) {
35 | MailView.Dispose ();
36 | MailView = null;
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPad/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | // AppDelegate.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.CrossCore;
7 | using Cirrious.MvvmCross.Touch.Platform;
8 | using Cirrious.MvvmCross.ViewModels;
9 | using Foundation;
10 | using UIKit;
11 |
12 | namespace MupApps.ControlsNavigation.Sample.IPhone
13 | {
14 | // The UIApplicationDelegate for the application. This class is responsible for launching the
15 | // User Interface of the application, as well as listening (and optionally responding) to
16 | // application events from iOS.
17 | [Register("AppDelegate")]
18 | public partial class AppDelegate : MvxApplicationDelegate
19 | {
20 | // class-level declarations
21 | UIWindow _window;
22 | //
23 | // This method is invoked when the application has loaded and is ready to run. In this
24 | // method you should instantiate the window, load the UI into it and then make the window
25 | // visible.
26 | //
27 | // You have 17 seconds to return from this method, or iOS will terminate your application.
28 | //
29 | public override bool FinishedLaunching (UIApplication app, NSDictionary options)
30 | {
31 | _window = new UIWindow(UIScreen.MainScreen.Bounds);
32 |
33 | var setup = new Setup(this, _window);
34 | setup.Initialize();
35 |
36 | var startup = Mvx.Resolve();
37 | startup.Start();
38 |
39 | _window.MakeKeyAndVisible();
40 |
41 | return true;
42 | }
43 | }
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/CellTemplates/FolderCellTemplate.cs:
--------------------------------------------------------------------------------
1 | // FolderCellTemplate.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 | using Cirrious.MvvmCross.Binding.BindingContext;
8 | using Cirrious.MvvmCross.Binding.Touch.Views;
9 | using Foundation;
10 | using MupApps.ControlsNavigation.Sample.Core.Model;
11 | using UIKit;
12 |
13 | namespace MupApps.ControlsNavigation.Sample.IPhone.CellTemplates
14 | {
15 | public partial class FolderCellTemplate : MvxTableViewCell
16 | {
17 | public static readonly UINib Nib = UINib.FromName ("FolderCellTemplate", NSBundle.MainBundle);
18 | public static readonly NSString Key = new NSString ("FolderCellTemplate");
19 |
20 | public FolderCellTemplate (IntPtr handle) : base (handle)
21 | {
22 | this.DelayBind(() => {
23 | var set = this.CreateBindingSet();
24 | set.Bind(FolderLabel).To(folder => folder.Name);
25 | set.Apply ();
26 | });
27 | }
28 |
29 | public static FolderCellTemplate Create ()
30 | {
31 | return (FolderCellTemplate)Nib.Instantiate (null, null) [0];
32 | }
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/CellTemplates/FolderCellTemplate.designer.cs:
--------------------------------------------------------------------------------
1 | // FolderCellTemplate.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 | using UIKit;
8 |
9 | namespace MupApps.ControlsNavigation.Sample.IPhone.CellTemplates
10 | {
11 | [Register("FolderCellTemplate")]
12 | partial class FolderCellTemplate
13 | {
14 | [Outlet]
15 | UILabel FolderLabel { get; set; }
16 |
17 | void ReleaseDesignerOutlets ()
18 | {
19 | if (FolderLabel != null) {
20 | FolderLabel.Dispose ();
21 | FolderLabel = null;
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/CellTemplates/MailCellTemplate.cs:
--------------------------------------------------------------------------------
1 | // MailCellTemplate.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 | using Cirrious.MvvmCross.Binding.BindingContext;
8 | using Cirrious.MvvmCross.Binding.Touch.Views;
9 | using Foundation;
10 | using MupApps.ControlsNavigation.Sample.Core.Model;
11 | using UIKit;
12 |
13 | namespace MupApps.ControlsNavigation.Sample.IPhone.CellTemplates
14 | {
15 | public partial class MailCellTemplate : MvxTableViewCell
16 | {
17 | public static readonly UINib Nib = UINib.FromName ("MailCellTemplate", NSBundle.MainBundle);
18 | public static readonly NSString Key = new NSString ("MailCellTemplate");
19 |
20 | public MailCellTemplate (IntPtr handle) : base (handle)
21 | {
22 | this.DelayBind(() => {
23 | var set = this.CreateBindingSet();
24 | set.Bind(FromLabel).To(mail => mail.From);
25 | set.Bind(SubjectLabel).To(mail => mail.Subject);
26 | set.Bind(DateLabel).To(mail => mail.Date);
27 | set.Apply ();
28 | });
29 | }
30 |
31 | public static MailCellTemplate Create ()
32 | {
33 | return (MailCellTemplate)Nib.Instantiate (null, null) [0];
34 | }
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/CellTemplates/MailCellTemplate.designer.cs:
--------------------------------------------------------------------------------
1 | // MailCellTemplate.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPhone.CellTemplates
9 | {
10 | [Register("MailCellTemplate")]
11 | partial class MailCellTemplate
12 | {
13 | [Outlet]
14 | UIKit.UILabel DateLabel { get; set; }
15 |
16 | [Outlet]
17 | UIKit.UILabel FromLabel { get; set; }
18 |
19 | [Outlet]
20 | UIKit.UILabel SubjectLabel { get; set; }
21 |
22 | void ReleaseDesignerOutlets ()
23 | {
24 | if (FromLabel != null) {
25 | FromLabel.Dispose ();
26 | FromLabel = null;
27 | }
28 |
29 | if (SubjectLabel != null) {
30 | SubjectLabel.Dispose ();
31 | SubjectLabel = null;
32 | }
33 |
34 | if (DateLabel != null) {
35 | DateLabel.Dispose ();
36 | DateLabel = null;
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/DebugTrace.cs:
--------------------------------------------------------------------------------
1 | // DebugTrace.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 | using System.Diagnostics;
8 | using Cirrious.CrossCore.Platform;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.IPhone
11 | {
12 | public class DebugTrace : IMvxTrace
13 | {
14 | public void Trace(MvxTraceLevel level, string tag, Func message)
15 | {
16 | Debug.WriteLine(tag + ":" + level + ":" + message());
17 | }
18 |
19 | public void Trace(MvxTraceLevel level, string tag, string message)
20 | {
21 | Debug.WriteLine(tag + ":" + level + ":" + message);
22 | }
23 |
24 | public void Trace(MvxTraceLevel level, string tag, string message, params object[] args)
25 | {
26 | try
27 | {
28 | Debug.WriteLine(string.Format(tag + ":" + level + ":" + message, args));
29 | }
30 | catch (FormatException)
31 | {
32 | Trace(MvxTraceLevel.Error, tag, "Exception during trace of {0} {1} {2}", level, message);
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDisplayName
6 | MupApps.ControlsNavigation.Sample.IPhone
7 | CFBundleIdentifier
8 | com.your-company.MupApps.ControlsNavigation.Sample.IPhone
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1.0
13 | LSRequiresIPhoneOS
14 |
15 | MinimumOSVersion
16 | 7.0
17 | UIDeviceFamily
18 |
19 | 1
20 |
21 | UIRequiredDeviceCapabilities
22 |
23 | armv7
24 |
25 | UISupportedInterfaceOrientations
26 |
27 | UIInterfaceOrientationPortrait
28 | UIInterfaceOrientationLandscapeLeft
29 | UIInterfaceOrientationLandscapeRight
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Main.cs:
--------------------------------------------------------------------------------
1 | // Main.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using UIKit;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPhone
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main (string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main (args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Setup.cs:
--------------------------------------------------------------------------------
1 | // Setup.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using UIKit;
7 | using Cirrious.CrossCore.Platform;
8 | using Cirrious.MvvmCross.ViewModels;
9 | using Cirrious.MvvmCross.Touch.Platform;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.IPhone
12 | {
13 | public class Setup : MvxTouchSetup
14 | {
15 | public Setup(MvxApplicationDelegate applicationDelegate, UIWindow window)
16 | : base(applicationDelegate, window)
17 | {
18 | }
19 |
20 | protected override IMvxApplication CreateApp ()
21 | {
22 | return new Core.App();
23 | }
24 |
25 | protected override IMvxTrace CreateDebugTrace()
26 | {
27 | return new DebugTrace();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Views/FolderView.cs:
--------------------------------------------------------------------------------
1 | // FolderView.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.Binding.BindingContext;
7 | using Cirrious.MvvmCross.Binding.Touch.Views;
8 | using Cirrious.MvvmCross.Touch.Views;
9 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
10 | using MupApps.ControlsNavigation.Sample.IPhone.CellTemplates;
11 |
12 | namespace MupApps.ControlsNavigation.Sample.IPhone.Views
13 | {
14 | public partial class FolderView : MvxViewController
15 | {
16 | public FolderView () : base ("FolderView", null)
17 | {
18 | }
19 |
20 | public override void DidReceiveMemoryWarning ()
21 | {
22 | // Releases the view if it doesn't have a superview.
23 | base.DidReceiveMemoryWarning ();
24 |
25 | // Release any cached data, images, etc that aren't in use.
26 | }
27 |
28 | public override void ViewDidLoad ()
29 | {
30 | base.ViewDidLoad ();
31 |
32 | var source = new MvxSimpleTableViewSource(MailsTable, MailCellTemplate.Key, MailCellTemplate.Key);
33 | MailsTable.Source = source;
34 |
35 | var set = this.CreateBindingSet();
36 | set.Bind(source).To (vm => vm.Mails);
37 | set.Bind(source).For(s => s.SelectedItem).To (vm => vm.SelectedMail);
38 | set.Apply ();
39 |
40 | Title = ((FolderViewModel)ViewModel).Folder.Name;
41 | }
42 | }
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Views/FolderView.designer.cs:
--------------------------------------------------------------------------------
1 | // FolderView.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPhone.Views
9 | {
10 | [Register("FolderView")]
11 | partial class FolderView
12 | {
13 | [Outlet]
14 | UIKit.UITableView MailsTable { get; set; }
15 |
16 | void ReleaseDesignerOutlets ()
17 | {
18 | if (MailsTable != null) {
19 | MailsTable.Dispose ();
20 | MailsTable = null;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Views/FoldersView.cs:
--------------------------------------------------------------------------------
1 | // FoldersView.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.Binding.BindingContext;
7 | using Cirrious.MvvmCross.Binding.Touch.Views;
8 | using Cirrious.MvvmCross.Touch.Views;
9 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
10 | using MupApps.ControlsNavigation.Sample.IPhone.CellTemplates;
11 |
12 | namespace MupApps.ControlsNavigation.Sample.IPhone.Views
13 | {
14 | public partial class FoldersView : MvxViewController
15 | {
16 | public FoldersView () : base ("FoldersView", null)
17 | {
18 | }
19 |
20 | public override void DidReceiveMemoryWarning ()
21 | {
22 | // Releases the view if it doesn't have a superview.
23 | base.DidReceiveMemoryWarning ();
24 |
25 | // Release any cached data, images, etc that aren't in use.
26 | }
27 |
28 | public override void ViewDidLoad ()
29 | {
30 | base.ViewDidLoad ();
31 |
32 | var source = new MvxSimpleTableViewSource(FoldersTable, FolderCellTemplate.Key, FolderCellTemplate.Key);
33 | FoldersTable.Source = source;
34 |
35 | var set = this.CreateBindingSet();
36 | set.Bind(source).To (vm => vm.Folders);
37 | set.Bind(source).For(s => s.SelectedItem).To (vm => vm.SelectedFolder);
38 | set.Apply ();
39 |
40 | this.Title = "MailApp";
41 | }
42 | }
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Views/FoldersView.designer.cs:
--------------------------------------------------------------------------------
1 | // FoldersView.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPhone.Views
9 | {
10 | [Register("FoldersView")]
11 | partial class FoldersView
12 | {
13 | [Outlet]
14 | UIKit.UITableView FoldersTable { get; set; }
15 |
16 | void ReleaseDesignerOutlets ()
17 | {
18 | if (FoldersTable != null) {
19 | FoldersTable.Dispose ();
20 | FoldersTable = null;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Views/MailView.cs:
--------------------------------------------------------------------------------
1 | // MailView.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.Binding.BindingContext;
7 | using Cirrious.MvvmCross.Touch.Views;
8 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.IPhone.Views
11 | {
12 | public partial class MailView : MvxViewController
13 | {
14 | public MailView () : base ("MailView", null)
15 | {
16 | }
17 |
18 | public override void DidReceiveMemoryWarning ()
19 | {
20 | // Releases the view if it doesn't have a superview.
21 | base.DidReceiveMemoryWarning ();
22 |
23 | // Release any cached data, images, etc that aren't in use.
24 | }
25 |
26 | public override void ViewDidLoad ()
27 | {
28 | base.ViewDidLoad ();
29 |
30 | var set = this.CreateBindingSet();
31 | set.Bind(FromLabel).To (vm => vm.Mail.From);
32 | set.Bind(ToLabel).To (vm => vm.Mail.To);
33 | set.Bind(SubjectLabel).To (vm => vm.Mail.Subject);
34 | set.Bind(BodyLabel).To (vm => vm.Mail.Body);
35 | set.Apply ();
36 | }
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/Views/MailView.designer.cs:
--------------------------------------------------------------------------------
1 | // MailView.designer.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Foundation;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.IPhone.Views
9 | {
10 | [Register("MailView")]
11 | partial class MailView
12 | {
13 | [Outlet]
14 | UIKit.UILabel BodyLabel { get; set; }
15 |
16 | [Outlet]
17 | UIKit.UILabel FromLabel { get; set; }
18 |
19 | [Outlet]
20 | UIKit.UILabel SubjectLabel { get; set; }
21 |
22 | [Outlet]
23 | UIKit.UILabel ToLabel { get; set; }
24 |
25 | void ReleaseDesignerOutlets ()
26 | {
27 | if (FromLabel != null) {
28 | FromLabel.Dispose ();
29 | FromLabel = null;
30 | }
31 |
32 | if (ToLabel != null) {
33 | ToLabel.Dispose ();
34 | ToLabel = null;
35 | }
36 |
37 | if (SubjectLabel != null) {
38 | SubjectLabel.Dispose ();
39 | SubjectLabel = null;
40 | }
41 |
42 | if (BodyLabel != null) {
43 | BodyLabel.Dispose ();
44 | BodyLabel = null;
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.IPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/App.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/AlignmentGrid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/AlignmentGrid.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/ApplicationIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/ApplicationIcon.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/FlipCycleTileLarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/FlipCycleTileLarge.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/FlipCycleTileMedium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/FlipCycleTileMedium.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/FlipCycleTileSmall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/FlipCycleTileSmall.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/IconicTileMediumLarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/IconicTileMediumLarge.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/IconicTileSmall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Assets/Tiles/IconicTileSmall.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/DebugTrace.cs:
--------------------------------------------------------------------------------
1 | // DebugTrace.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 | using System.Diagnostics;
8 | using Cirrious.CrossCore.Platform;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.WindowsPhone
11 | {
12 | public class DebugTrace : IMvxTrace
13 | {
14 | public void Trace(MvxTraceLevel level, string tag, Func message)
15 | {
16 | Debug.WriteLine(tag + ":" + level + ":" + message());
17 | }
18 |
19 | public void Trace(MvxTraceLevel level, string tag, string message)
20 | {
21 | Debug.WriteLine(tag + ":" + level + ":" + message);
22 | }
23 |
24 | public void Trace(MvxTraceLevel level, string tag, string message, params object[] args)
25 | {
26 | try
27 | {
28 | Debug.WriteLine(string.Format(tag + ":" + level + ":" + message, args));
29 | }
30 | catch (FormatException)
31 | {
32 | Trace(MvxTraceLevel.Error, tag, "Exception during trace of {0} {1} {2}", level, message);
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 | using System.Resources;
9 |
10 | // General Information about an assembly is controlled through the following
11 | // set of attributes. Change these attribute values to modify the information
12 | // associated with an assembly.
13 | [assembly: AssemblyTitle("MupApps.ControlsNavigation.Sample.WindowsPhone")]
14 | [assembly: AssemblyDescription("")]
15 | [assembly: AssemblyConfiguration("")]
16 | [assembly: AssemblyCompany("")]
17 | [assembly: AssemblyProduct("MupApps.ControlsNavigation.Sample.WindowsPhone")]
18 | [assembly: AssemblyCopyright("Copyright © 2013")]
19 | [assembly: AssemblyTrademark("")]
20 | [assembly: AssemblyCulture("")]
21 |
22 | // Setting ComVisible to false makes the types in this assembly not visible
23 | // to COM components. If you need to access a type in this assembly from
24 | // COM, set the ComVisible attribute to true on that type.
25 | [assembly: ComVisible(false)]
26 |
27 | // The following GUID is for the ID of the typelib if this project is exposed to COM
28 | [assembly: Guid("ca9c5f05-c1b5-4da6-bbd1-b5ae5bf154d1")]
29 |
30 | // Version information for an assembly consists of the following four values:
31 | //
32 | // Major Version
33 | // Minor Version
34 | // Build Number
35 | // Revision
36 | //
37 | // You can specify all the values or you can default the Revision and Build Numbers
38 | // by using the '*' as shown below:
39 | [assembly: AssemblyVersion("1.0.0.0")]
40 | [assembly: AssemblyFileVersion("1.0.0.0")]
41 | [assembly: NeutralResourcesLanguageAttribute("en-US")]
42 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Properties/WMAppManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Assets\ApplicationIcon.png
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Assets\Tiles\FlipCycleTileSmall.png
21 | 0
22 | Assets\Tiles\FlipCycleTileMedium.png
23 | MupApps.ControlsNavigation.Sample.WindowsPhone
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/SampleData/FoldersSampleDataSource/FoldersSampleDataSource.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/SampleData/FoldersSampleDataSource/FoldersSampleDataSource.xsd:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Setup.cs:
--------------------------------------------------------------------------------
1 | // Setup.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.CrossCore.Platform;
7 | using Cirrious.MvvmCross.ViewModels;
8 | using Cirrious.MvvmCross.WindowsPhone.Platform;
9 | using Microsoft.Phone.Controls;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.WindowsPhone
12 | {
13 | public class Setup : MvxPhoneSetup
14 | {
15 | public Setup(PhoneApplicationFrame rootFrame) : base(rootFrame)
16 | {
17 | }
18 |
19 | protected override IMvxApplication CreateApp()
20 | {
21 | return new Core.App();
22 | }
23 |
24 | protected override IMvxTrace CreateDebugTrace()
25 | {
26 | return new DebugTrace();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/ToDo-MvvmCross/_ Windows Phone UI.txt:
--------------------------------------------------------------------------------
1 | The steps to get this WindowsPhone UI working are:
2 |
3 | 1. Add a reference to your Core PCL project
4 | 2. Create a Setup.cs file
5 | 3. Change App.Xaml.cs so that it creates a 'new Setup(RootFrame)' during its constructor
6 |
7 | var setup = new Setup(RootFrame);
8 | setup.Initialize();
9 |
10 | 4. Change App.Xaml.cs so that it intercepts the first navigation:
11 |
12 | private void Application_Launching(object sender, LaunchingEventArgs e)
13 | {
14 | RootFrame.Navigating += RootFrameOnNavigating;
15 | }
16 |
17 | private void RootFrameOnNavigating(object sender, NavigatingCancelEventArgs args)
18 | {
19 | args.Cancel = true;
20 | RootFrame.Navigating -= RootFrameOnNavigating;
21 | RootFrame.Dispatcher.BeginInvoke(() => { Cirrious.CrossCore.Mvx.Resolve().Start(); });
22 | }
23 |
24 |
25 | 5. Add a Views folder - it must be called "Views" - and in this place a view - xaml.cs and .xaml
26 | - Change the inheritance of this Page to MvxPhonePage in both the Xaml and the Xaml.cs files
27 | - Add some XAML for the content pane - e.g.
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Views/FolderView.xaml.cs:
--------------------------------------------------------------------------------
1 | // FolderView.xaml.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.WindowsPhone.Views;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.WindowsPhone.Views
9 | {
10 | public partial class FolderView : MvxPhonePage
11 | {
12 | public FolderView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Views/FoldersView.xaml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Views/FoldersView.xaml.cs:
--------------------------------------------------------------------------------
1 | // FoldersView.xaml.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.WindowsPhone.Views;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.WindowsPhone.Views
9 | {
10 | public partial class FoldersView : MvxPhonePage
11 | {
12 | public FoldersView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/Views/MailView.xaml.cs:
--------------------------------------------------------------------------------
1 | // MailView.xaml.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.MvvmCross.WindowsPhone.Views;
7 |
8 | namespace MupApps.ControlsNavigation.Sample.WindowsPhone.Views
9 | {
10 | public partial class MailView : MvxPhonePage
11 | {
12 | public MailView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsPhoneControls/ToDo-MvvmCross-ControlsNavigation/_ Windows Phone UI.txt:
--------------------------------------------------------------------------------
1 | The steps to get this plugin on Store UI working are:
2 |
3 | 1. Override the CreateViewPresenter method on your Setup.cs file:
4 |
5 | protected override IMvxPhoneViewPresenter CreateViewPresenter(PhoneApplicationFrame rootFrame)
6 | {
7 | var viewPresenter = base.CreateViewPresenter(rootFrame);
8 | return new MvxPhoneControlPresenter(viewPresenter);
9 | }
10 |
11 | 2. Add a new UserControl to the Controls folder and Inherit from MvxStoreControl,
12 | with the same name of the ViewModel but ending in Control (Ex: SecondViewModel -> SecondControl)
13 |
14 |
28 |
29 | The control will be hidden until ShowViewModel has been called.
30 | You could change that behaviour setting the property EmptyControlBehaviour (None, Hidden, Disabled)
31 |
32 | 4. Call the ShowViewModel method from the container view's ViewModel and the control will do its job!
33 |
34 | You can check a working sample here:
35 | https://github.com/ChristianRuiz/MvvmCross-ControlsNavigation/tree/v1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore
36 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Assets/Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Assets/Logo.scale-100.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Assets/SmallLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Assets/SmallLogo.scale-100.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Bootstrap/TabletNavigationPluginBootstrap.cs:
--------------------------------------------------------------------------------
1 | // TabletNavigationPluginBootstrap.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 | using System.Collections.Generic;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using Cirrious.CrossCore.Plugins;
12 |
13 | namespace MupApps.TabletNavigation.Sample.WindowsStore.Bootstrap
14 | {
15 | public class TabletNavigationPluginBootstrap
16 | : MvxPluginBootstrapAction
17 | {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Controls/FolderControl.xaml.cs:
--------------------------------------------------------------------------------
1 | // FolderControl.xaml.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Windows.UI.Xaml;
7 | // The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
8 | using MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore;
9 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.WindowsStore.Controls
12 | {
13 | public sealed partial class FolderControl : MvxStoreControl
14 | {
15 | public FolderControl()
16 | {
17 | this.InitializeComponent();
18 | }
19 |
20 | void FolderControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
21 | {
22 | //If we change the folder, we reset the current mail ViewModel
23 | ResetControl(typeof(MailViewModel));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Controls/MailControl.xaml.cs:
--------------------------------------------------------------------------------
1 | // MailControl.xaml.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | // The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
7 | using MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore;
8 |
9 | namespace MupApps.ControlsNavigation.Sample.WindowsStore.Controls
10 | {
11 | public sealed partial class MailControl : MvxStoreControl
12 | {
13 | public MailControl()
14 | {
15 | this.InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/DebugTrace.cs:
--------------------------------------------------------------------------------
1 | // DebugTrace.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System;
7 | using System.Diagnostics;
8 | using Cirrious.CrossCore.Platform;
9 |
10 | namespace MupApps.ControlsNavigation.Sample.WindowsStore
11 | {
12 | public class DebugTrace : IMvxTrace
13 | {
14 | public void Trace(MvxTraceLevel level, string tag, Func message)
15 | {
16 | Debug.WriteLine(tag + ":" + level + ":" + message());
17 | }
18 |
19 | public void Trace(MvxTraceLevel level, string tag, string message)
20 | {
21 | Debug.WriteLine(tag + ":" + level + ":" + message);
22 | }
23 |
24 | public void Trace(MvxTraceLevel level, string tag, string message, params object[] args)
25 | {
26 | try
27 | {
28 | Debug.WriteLine(string.Format(tag + ":" + level + ":" + message, args));
29 | }
30 | catch (FormatException)
31 | {
32 | Trace(MvxTraceLevel.Error, tag, "Exception during trace of {0} {1} {2}", level, message);
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/MupApps.ControlsNavigation.Sample.WindowsStore_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/MupApps.ControlsNavigation.Sample.WindowsStore_TemporaryKey.pfx
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | MVVMCross Controls Navigation Sample
6 | Christian Ruiz
7 | Assets\StoreLogo.png
8 |
9 |
10 | 6.3.0
11 | 6.3.0
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // AssemblyInfo.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("MupApps.ControlsNavigation.Sample.WindowsStore")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("MupApps.ControlsNavigation.Sample.WindowsStore")]
17 | [assembly: AssemblyCopyright("Copyright © 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // Version information for an assembly consists of the following four values:
22 | //
23 | // Major Version
24 | // Minor Version
25 | // Build Number
26 | // Revision
27 | //
28 | // You can specify all the values or you can default the Build and Revision Numbers
29 | // by using the '*' as shown below:
30 | // [assembly: AssemblyVersion("1.0.*")]
31 | [assembly: AssemblyVersion("1.0.0.0")]
32 | [assembly: AssemblyFileVersion("1.0.0.0")]
33 | [assembly: ComVisible(false)]
34 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource.xaml.cs:
--------------------------------------------------------------------------------
1 | // FoldersSampleDataSource.xaml.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | namespace Blend.SampleData.FoldersSampleDataSource
7 | {
8 | using System;
9 | using System.ComponentModel;
10 |
11 | // To significantly reduce the sample data footprint in your production application, you can set
12 | // the DISABLE_SAMPLE_DATA conditional compilation constant and disable sample data at runtime.
13 | #if DISABLE_SAMPLE_DATA
14 | internal class FoldersSampleDataSource { }
15 | #else
16 |
17 | public class FoldersSampleDataSource : INotifyPropertyChanged
18 | {
19 | public event PropertyChangedEventHandler PropertyChanged;
20 |
21 | protected virtual void OnPropertyChanged(string propertyName)
22 | {
23 | if (this.PropertyChanged != null)
24 | {
25 | this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
26 | }
27 | }
28 |
29 | public FoldersSampleDataSource()
30 | {
31 | try
32 | {
33 | Uri resourceUri = new Uri("ms-appx:/SampleData/FoldersSampleDataSource/FoldersSampleDataSource.xaml", UriKind.RelativeOrAbsolute);
34 | Windows.UI.Xaml.Application.LoadComponent(this, resourceUri);
35 | }
36 | catch
37 | {
38 | }
39 | }
40 |
41 | private Folders _Folders = new Folders();
42 |
43 | public Folders Folders
44 | {
45 | get
46 | {
47 | return this._Folders;
48 | }
49 | }
50 | }
51 |
52 | public class FoldersItem : INotifyPropertyChanged
53 | {
54 | public event PropertyChangedEventHandler PropertyChanged;
55 |
56 | protected virtual void OnPropertyChanged(string propertyName)
57 | {
58 | if (this.PropertyChanged != null)
59 | {
60 | this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
61 | }
62 | }
63 |
64 | private string _Name = string.Empty;
65 |
66 | public string Name
67 | {
68 | get
69 | {
70 | return this._Name;
71 | }
72 |
73 | set
74 | {
75 | if (this._Name != value)
76 | {
77 | this._Name = value;
78 | this.OnPropertyChanged("Name");
79 | }
80 | }
81 | }
82 | }
83 |
84 | public class Folders : System.Collections.ObjectModel.ObservableCollection
85 | {
86 | }
87 | #endif
88 | }
89 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource.xsd:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image01.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image02.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image03.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image04.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/FoldersSampleDataSource/FoldersSampleDataSource_Files/image05.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource.xsd:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image01.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image02.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image03.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image04.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailSampleDataSource/MailSampleDataSource_Files/image05.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource.xsd:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image01.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image02.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image03.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image04.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChristianRuiz/MvvmCross-ControlsNavigation/ffbb4780cf7eac0ca187a7b6b3c052610b9276e1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/SampleData/MailsSampleDataSource/MailsSampleDataSource_Files/image05.png
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Setup.cs:
--------------------------------------------------------------------------------
1 | // Setup.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using Cirrious.CrossCore.Platform;
7 | using Cirrious.MvvmCross.ViewModels;
8 | using Cirrious.MvvmCross.WindowsStore.Platform;
9 | using Windows.UI.Xaml.Controls;
10 | using Cirrious.MvvmCross.WindowsStore.Views;
11 | using MupApps.MvvmCross.Plugins.ControlsNavigation.WindowsStore;
12 |
13 | namespace MupApps.ControlsNavigation.Sample.WindowsStore
14 | {
15 | public class Setup : MvxStoreSetup
16 | {
17 | public Setup(Frame rootFrame) : base(rootFrame)
18 | {
19 | }
20 |
21 | protected override IMvxApplication CreateApp()
22 | {
23 | return new Core.App();
24 | }
25 |
26 | protected override IMvxTrace CreateDebugTrace()
27 | {
28 | return new DebugTrace();
29 | }
30 |
31 | protected override IMvxStoreViewPresenter CreateViewPresenter(Frame rootFrame)
32 | {
33 | var viewPresenter = base.CreateViewPresenter(rootFrame);
34 | return new MvxStoreControlPresenter(viewPresenter);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/ToDo-MvvmCross/_ Windows Store UI.txt:
--------------------------------------------------------------------------------
1 | The steps to get this Store UI working are:
2 |
3 | 1. Add a reference to your Core PCL project
4 | 2. Create a Setup.cs file
5 | 3. Change App.Xaml.cs so that it creates a 'new Setup(RootFrame)' during its OnLaunched:
6 |
7 | protected override void OnLaunched(LaunchActivatedEventArgs args)
8 | {
9 | var rootFrame = Window.Current.Content as Frame;
10 |
11 | // Do not repeat app initialization when the Window already has content,
12 | // just ensure that the window is active
13 | if (rootFrame == null)
14 | {
15 | // Create a Frame to act as the navigation context and navigate to the first page
16 | rootFrame = new Frame();
17 |
18 | if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
19 | {
20 | //TODO: Load state from previously suspended application
21 | }
22 |
23 | // Place the frame in the current Window
24 | Window.Current.Content = rootFrame;
25 | }
26 |
27 | if (rootFrame.Content == null)
28 | {
29 | // When the navigation stack isn't restored navigate to the first page,
30 | // configuring the new page by passing required information as a navigation
31 | // parameter
32 |
33 | var setup = new Setup(rootFrame);
34 | setup.Initialize();
35 |
36 | var start = Cirrious.CrossCore.Mvx.Resolve();
37 | start.Start();
38 | }
39 | // Ensure the current window is active
40 | Window.Current.Activate();
41 | }
42 |
43 | 4. Add a views folder and a view - xaml.cs and .xaml based on BasicPage - this will add 5 files to the Common folder.
44 | - Change the Common/LayoutAwarePage.cs inheritance to Cirrious.MvvmCross.WindowsStore.Views.MvxStorePage
45 | - Change the Common/LayoutAwarePage.cs - remove the OnNavigatedTo and OnNavigatedFrom handlers
46 | - Add some content for your Xaml - e.g.
47 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Views/FoldersView.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/Views/FoldersView.xaml.cs:
--------------------------------------------------------------------------------
1 | // FoldersView.xaml.cs
2 | // (c) Copyright Christian Ruiz @_christian_ruiz
3 | // MvvmCross - Controls Navigation Plugin is licensed using Microsoft Public License (Ms-PL)
4 | //
5 |
6 | using System.Linq;
7 | using Windows.UI.Xaml;
8 | using Cirrious.MvvmCross.WindowsStore.Views;
9 | using MupApps.ControlsNavigation.Sample.Core.ViewModels;
10 |
11 | namespace MupApps.ControlsNavigation.Sample.WindowsStore.Views
12 | {
13 | public sealed partial class FoldersView : MvxStorePage
14 | {
15 | public FoldersView()
16 | {
17 | this.InitializeComponent();
18 | }
19 |
20 | private void FoldersView_OnLoaded(object sender, RoutedEventArgs e)
21 | {
22 | //As the folder is also showed on this view, we don't wait for the user to select one
23 | ((FoldersViewModel)ViewModel).SelectedFolder = ((FoldersViewModel)ViewModel).Folders.FirstOrDefault();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.WindowsStore/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/App.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using Cirrious.CrossCore;
9 | using Cirrious.MvvmCross.ViewModels;
10 | using Cirrious.MvvmCross.Wpf.Views;
11 |
12 | namespace MupApps.ControlsNavigation.Sample.Wpf
13 | {
14 | ///
15 | /// Interaction logic for App.xaml
16 | ///
17 | public partial class App : Application
18 | {
19 | private bool _setupComplete;
20 |
21 | private void DoSetup()
22 | {
23 | var presenter = new MvxSimpleWpfViewPresenter(MainWindow);
24 |
25 | var setup = new Setup(Dispatcher, presenter);
26 | setup.Initialize();
27 |
28 | var start = Mvx.Resolve();
29 | start.Start();
30 |
31 | _setupComplete = true;
32 | }
33 |
34 | protected override void OnActivated(EventArgs e)
35 | {
36 | if (!_setupComplete)
37 | DoSetup();
38 |
39 | base.OnActivated(e);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/Controls/FolderControl.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf;
16 |
17 | namespace MupApps.ControlsNavigation.Sample.Wpf.Controls
18 | {
19 | ///
20 | /// Interaction logic for FolderControl.xaml
21 | ///
22 | public partial class FolderControl : MvxWpfControl
23 | {
24 | public FolderControl()
25 | {
26 | InitializeComponent();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/Controls/MailControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/Controls/MailControl.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf;
16 |
17 | namespace MupApps.ControlsNavigation.Sample.Wpf.Controls
18 | {
19 | ///
20 | /// Interaction logic for MailControl.xaml
21 | ///
22 | public partial class MailControl : MvxWpfControl
23 | {
24 | public MailControl()
25 | {
26 | InitializeComponent();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/DebugTrace.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Cirrious.CrossCore.Platform;
4 |
5 | namespace MupApps.ControlsNavigation.Sample.Wpf
6 | {
7 | public class DebugTrace : IMvxTrace
8 | {
9 | public void Trace(MvxTraceLevel level, string tag, Func message)
10 | {
11 | Debug.WriteLine(tag + ":" + level + ":" + message());
12 | }
13 |
14 | public void Trace(MvxTraceLevel level, string tag, string message)
15 | {
16 | Debug.WriteLine(tag + ":" + level + ":" + message);
17 | }
18 |
19 | public void Trace(MvxTraceLevel level, string tag, string message, params object[] args)
20 | {
21 | try
22 | {
23 | Debug.WriteLine(string.Format(tag + ":" + level + ":" + message, args));
24 | }
25 | catch (FormatException)
26 | {
27 | Trace(MvxTraceLevel.Error, tag, "Exception during trace of {0} {1}", level, message);
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace MupApps.ControlsNavigation.Sample.Wpf
17 | {
18 | ///
19 | /// Interaction logic for MainPage.xaml
20 | ///
21 | public partial class MainPage : UserControl
22 | {
23 | public MainPage()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.33440
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace MupApps.ControlsNavigation.Sample.Wpf.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/Setup.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Threading;
2 | using Cirrious.CrossCore.Platform;
3 | using Cirrious.MvvmCross.ViewModels;
4 | using Cirrious.MvvmCross.Views;
5 | using Cirrious.MvvmCross.Wpf.Platform;
6 | using Cirrious.MvvmCross.Wpf.Views;
7 | using MupApps.MvvmCross.Plugins.ControlsNavigation.Wpf;
8 |
9 | namespace MupApps.ControlsNavigation.Sample.Wpf
10 | {
11 | public class Setup
12 | : MvxWpfSetup
13 | {
14 | public Setup(Dispatcher dispatcher, IMvxWpfViewPresenter presenter)
15 | : base(dispatcher, presenter)
16 | {
17 | _uiThreadDispatcher = dispatcher;
18 | _presenter = presenter;
19 | }
20 |
21 | protected override IMvxApplication CreateApp()
22 | {
23 | return new Core.App();
24 | }
25 |
26 | protected override IMvxTrace CreateDebugTrace()
27 | {
28 | return new DebugTrace();
29 | }
30 |
31 | private readonly Dispatcher _uiThreadDispatcher;
32 | private readonly IMvxWpfViewPresenter _presenter;
33 | protected override IMvxViewDispatcher CreateViewDispatcher()
34 | {
35 | var controlPresenter = new MvxWpfControlPresenter(_presenter);
36 |
37 | return new MvxWpfViewDispatcher(_uiThreadDispatcher, controlPresenter);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/ToDo-MvvmCross-ControlsNavigation/_ Wpf UI.txt:
--------------------------------------------------------------------------------
1 | The steps to get this plugin on Wpf UI working are:
2 |
3 | 1. Replace the constructor and override the CreateViewDispatcher method on your Setup.cs file:
4 |
5 | private readonly Dispatcher _uiThreadDispatcher;
6 | private readonly IMvxWpfViewPresenter _presenter;
7 |
8 | public Setup(Dispatcher dispatcher, IMvxWpfViewPresenter presenter)
9 | : base(dispatcher, presenter)
10 | {
11 | _uiThreadDispatcher = dispatcher;
12 | _presenter = presenter;
13 | }
14 |
15 | protected override IMvxViewDispatcher CreateViewDispatcher()
16 | {
17 | var controlPresenter = new MvxWpfControlPresenter(_presenter);
18 |
19 | return new MvxWpfViewDispatcher(_uiThreadDispatcher, controlPresenter);
20 | }
21 |
22 | 2. Add a new UserControl to the Controls folder and Inherit from MvxWpfControl,
23 | with the same name of the ViewModel but ending in Control (Ex: SecondViewModel -> SecondControl)
24 |
25 |
39 |
40 | The control will be hidden until ShowViewModel has been called.
41 | You could change that behaviour setting the property EmptyControlBehaviour (None, Hidden, Disabled)
42 |
43 | 4. Call the ShowViewModel method from the container view's ViewModel and the control will do its job!
44 |
45 | You can check a working sample here:
46 | https://github.com/ChristianRuiz/MvvmCross-ControlsNavigation/tree/v1/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf
47 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/ToDo-MvvmCross/_ Wpf UI.txt:
--------------------------------------------------------------------------------
1 | The only step to get this Wpf .Net 4.5 UI working is:
2 |
3 | 1. Add a reference to your Core PCL project
4 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/Views/FoldersView.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/Views/FoldersView.xaml.cs:
--------------------------------------------------------------------------------
1 | using Cirrious.MvvmCross.Wpf.Views;
2 |
3 | namespace MupApps.ControlsNavigation.Sample.Wpf.Views
4 | {
5 | public partial class FoldersView : MvxWpfView
6 | {
7 | public FoldersView()
8 | {
9 | this.InitializeComponent();
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/MupApps.MvvmCross.Plugins.ControlsNavigation/Sample/MupApps.ControlsNavigation.Sample.Wpf/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------