├── art └── logo.png ├── iOS ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── packages.config ├── Entitlements.plist ├── Main.cs ├── AppDelegate.cs ├── LaunchScreen.storyboard ├── Info.plist └── VMFirstNav.Demo.iOS.csproj ├── Droid ├── Resources │ ├── drawable │ │ └── icon.png │ ├── drawable-hdpi │ │ └── icon.png │ ├── drawable-xhdpi │ │ └── icon.png │ ├── drawable-xxhdpi │ │ └── icon.png │ ├── layout │ │ ├── Toolbar.axml │ │ └── Tabbar.axml │ ├── values │ │ └── styles.xml │ └── AboutResources.txt ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Assets │ └── AboutAssets.txt ├── packages.config ├── MainActivity.cs └── VMFirstNav.Demo.Droid.csproj ├── VMFirstNav ├── IViewModel.cs ├── IMasterListItem.cs ├── IViewFor.cs ├── MasterListItem.cs ├── VMFirstNav.csproj ├── INavigationService.cs └── NavigationService.cs ├── VMFirstNav.Demo ├── packages.config ├── VMFirstNav.DemoPage.xaml.cs ├── App.xaml ├── VMFirstNav.DemoPage.xaml ├── Views │ ├── MasterDetailRootPage.xaml.cs │ ├── Tabs │ │ ├── TabOneView.xaml │ │ ├── TabTwoView.xaml │ │ ├── TabOneChildView.xaml │ │ ├── TabTwoChildView.xaml │ │ ├── TabOneView.xaml.cs │ │ ├── TabTwoView.xaml.cs │ │ ├── TabOneChildView.xaml.cs │ │ └── TabTwoChildView.xaml.cs │ ├── Normal │ │ ├── NormalModalPage.xaml │ │ ├── NormalOnePage.xaml │ │ ├── NormalChildTwoPage.xaml │ │ ├── NormalChildThreePage.xaml │ │ ├── NormalOneChildPage.xaml │ │ ├── NormalOnePage.xaml.cs │ │ ├── NormalChildThreePage.xaml.cs │ │ ├── NormalModalPage.xaml.cs │ │ ├── NormalChildTwoPage.xaml.cs │ │ └── NormalOneChildPage.xaml.cs │ ├── RootTabPage.xaml │ ├── MasterDetail │ │ ├── MasterListNavPage.xaml.cs │ │ └── MasterListNavPage.xaml │ ├── MasterDetailRootPage.xaml │ └── RootTabPage.xaml.cs ├── ViewModels │ ├── Tabs │ │ ├── RootTabViewModel.cs │ │ ├── TabTwoChildViewModel.cs │ │ ├── TabTwoViewModel.cs │ │ ├── TabOneViewModel.cs │ │ └── TabOneChildViewModel.cs │ ├── Normal │ │ ├── NormalChildTwoViewModel.cs │ │ ├── NormalModalViewModel.cs │ │ ├── NormalChildThreeViewModel.cs │ │ ├── NormalOneViewModel.cs │ │ └── NormalOneChildViewModel.cs │ └── MasterDetail │ │ └── MasterListNavViewModel.cs ├── Converters │ └── SelectedItemEventArgsToSelectedItemConverter.cs ├── App.xaml.cs ├── Properties │ └── AssemblyInfo.cs ├── Behaviors │ └── ListViewSelectedItemBehavior.cs └── VMFirstNav.Demo.csproj ├── changelog.md ├── appveyor.yml ├── LICENSE ├── .gitignore ├── README.md ├── bootstrapper.ps1 └── VMFirstNav.sln /art/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/codemill.vmfirstnav/HEAD/art/logo.png -------------------------------------------------------------------------------- /iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/codemill.vmfirstnav/HEAD/Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/codemill.vmfirstnav/HEAD/Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/codemill.vmfirstnav/HEAD/Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemillmatt/codemill.vmfirstnav/HEAD/Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /VMFirstNav/IViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace CodeMill.VMFirstNav 3 | { 4 | // Marker interface 5 | public interface IViewModel 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /iOS/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /VMFirstNav/IMasterListItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CodeMill.VMFirstNav 4 | { 5 | public interface IMasterListItem where T : class, IViewModel 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /VMFirstNav.Demo/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /VMFirstNav.Demo/VMFirstNav.DemoPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace VMFirstNav.Demo 4 | { 5 | public partial class VMFirstNav_DemoPage : ContentPage 6 | { 7 | public VMFirstNav_DemoPage() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /VMFirstNav/IViewFor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace CodeMill.VMFirstNav 3 | { 4 | // IViewFor should only be a marker interface 5 | public interface IViewFor { } 6 | 7 | public interface IViewFor : IViewFor where T : IViewModel 8 | { 9 | T ViewModel { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /VMFirstNav.Demo/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /VMFirstNav/MasterListItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace CodeMill.VMFirstNav 3 | { 4 | public class MasterListItem : IMasterListItem where T : class, IViewModel 5 | { 6 | public string DisplayName { get; set; } 7 | 8 | public MasterListItem(string displayName) 9 | { 10 | DisplayName = displayName; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /VMFirstNav.Demo/VMFirstNav.DemoPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /Droid/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | - 1.0.1.31 - Added a fix to check if VM already registered. See [PR #14](https://github.com/codemillmatt/codemill.vmfirstnav/pull/14). 2 | - 0.0.9999 - 1.0.0.22 - Basic setting up of CI and Nuget - see [ReadMe](https://github.com/codemillmatt/codemill.vmfirstnav/blob/master/README.md) and this [blog post](https://codemilltech.com/xamarin-forms-viewmodel-first-navigation-library) for details on how to use the library. 3 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.1.{build} 2 | image: Visual Studio 2017 3 | assembly_info: 4 | patch: true 5 | assembly_version: '{version}' 6 | assembly_file_version: '{version}' 7 | assembly_informational_version: '{version}' 8 | branches: 9 | only: 10 | - master 11 | build_script: 12 | - cmd: >- 13 | nuget restore .\VMFirstNav.sln 14 | 15 | powershell .\bootstrapper.ps1 -Target NuGetPack -Verbosity diagnostic 16 | artifacts: 17 | - path: '*.nupkg' 18 | name: NuGet -------------------------------------------------------------------------------- /VMFirstNav.Demo/Views/MasterDetailRootPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using Xamarin.Forms; 5 | 6 | namespace VMFirstNav.Demo 7 | { 8 | public partial class MasterDetailRootPage : MasterDetailPage 9 | { 10 | public MasterDetailRootPage() 11 | { 12 | InitializeComponent(); 13 | 14 | listNav.ViewModel = new MasterListNavViewModel(); 15 | normalOne.ViewModel = new NormalOneViewModel(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Droid/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace VMFirstNav.Demo.iOS 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 | -------------------------------------------------------------------------------- /VMFirstNav.Demo/Views/Tabs/TabOneView.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VMFirstNav.Demo/Views/Normal/NormalChildThreePage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 |