├── FUNDING.yml ├── MvxForms.iOS ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Entitlements.plist ├── Setup.cs ├── AppDelegate.cs ├── Main.cs ├── LaunchScreen.storyboard ├── Info.plist ├── LinkerPleaseInclude.cs └── MvxForms.iOS.csproj ├── MvxForms.Droid ├── Resources │ ├── drawable │ │ ├── icon.png │ │ └── splash.png │ ├── drawable-hdpi │ │ └── icon.png │ ├── drawable-xhdpi │ │ └── icon.png │ ├── drawable-xxhdpi │ │ └── icon.png │ ├── values │ │ ├── SplashStyle.xml │ │ └── styles.xml │ ├── layout │ │ ├── Toolbar.axml │ │ ├── SplashScreen.axml │ │ ├── Tabbar.axml │ │ └── MainView.axml │ └── AboutResources.txt ├── Setup.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── MainActivity.cs ├── Assets │ └── AboutAssets.txt ├── SplashScreen.cs ├── LinkerPleaseInclude.cs └── MvxForms.Droid.csproj ├── MvxForms.Core ├── App.xaml.cs ├── App.xaml ├── Pages │ ├── MvxFormsPage.xaml.cs │ └── MvxFormsPage.xaml ├── MvxForms.Core.csproj ├── CoreApp.cs └── ViewModels │ └── MvxFormsViewModel.cs ├── README.md ├── .gitattributes ├── LICENSE ├── .editorconfig ├── MvxForms.sln └── .gitignore /FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: Baseflow 2 | custom: https://baseflow.com/contact 3 | -------------------------------------------------------------------------------- /MvxForms.iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baseflow/MvxForms/HEAD/MvxForms.Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/drawable/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baseflow/MvxForms/HEAD/MvxForms.Droid/Resources/drawable/splash.png -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baseflow/MvxForms/HEAD/MvxForms.Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baseflow/MvxForms/HEAD/MvxForms.Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baseflow/MvxForms/HEAD/MvxForms.Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /MvxForms.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MvxForms.Core/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace MvxForms.Core 4 | { 5 | public partial class App : Application 6 | { 7 | public App() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MvxForms.Droid/Setup.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | using MvvmCross.Forms.Platforms.Android.Core; 3 | using MvvmCross.ViewModels; 4 | using MvxForms.Core; 5 | 6 | namespace MvxForms.Droid 7 | { 8 | public class Setup : MvxFormsAndroidSetup 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /MvxForms.iOS/Setup.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Forms.Platforms.Ios.Core; 2 | using MvvmCross.Platforms.Ios.Core; 3 | using MvvmCross.ViewModels; 4 | using MvxForms.Core; 5 | using UIKit; 6 | 7 | namespace MvxForms.iOS 8 | { 9 | public class Setup : MvxFormsIosSetup 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/values/SplashStyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /MvxForms.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using MvvmCross.Forms.Platforms.Ios.Core; 3 | using UIKit; 4 | 5 | namespace MvxForms.iOS 6 | { 7 | [Register("AppDelegate")] 8 | public partial class AppDelegate : MvxFormsApplicationDelegate 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /MvxForms.Core/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MvxForms.Core/Pages/MvxFormsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Forms.Views; 2 | using MvxForms.Core.ViewModels; 3 | 4 | namespace MvxForms.Core.Pages 5 | { 6 | public partial class MvxFormsPage : MvxContentPage 7 | { 8 | public MvxFormsPage() 9 | { 10 | InitializeComponent(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /MvxForms.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /MvxForms.Core/MvxForms.Core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/layout/SplashScreen.axml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /MvxForms.Core/CoreApp.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.IoC; 2 | using MvvmCross.ViewModels; 3 | 4 | namespace MvxForms.Core 5 | { 6 | public class CoreApp : MvxApplication 7 | { 8 | public override void Initialize() 9 | { 10 | CreatableTypes() 11 | .EndingWith("Service") 12 | .AsInterfaces() 13 | .RegisterAsLazySingleton(); 14 | 15 | RegisterAppStart(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MvxForms 2 | Sample App with Xamarin.Forms and MvvmCross 3 | 4 | Blog with information at: https://medium.com/@martijn00/using-mvvmcross-with-xamarin-forms-part-1-eaee5815bb8c 5 | 6 | # Support 7 | 8 | * Feel free to open an issue. Make sure to use one of the templates! 9 | * Commercial support is available. Integration with your app or services, samples, feature request, etc. Email: [hello@baseflow.com](mailto:hello@baseflow.com) 10 | * Powered by: [baseflow.com](https://baseflow.com) 11 | -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /MvxForms.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 MvxForms.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 | -------------------------------------------------------------------------------- /MvxForms.Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Android.OS; 4 | using MvvmCross.Forms.Platforms.Android.Views; 5 | 6 | namespace MvxForms.Droid 7 | { 8 | [Activity(Label = "MvxForms.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 9 | public class MainActivity : MvxFormsAppCompatActivity 10 | { 11 | protected override void OnCreate(Bundle bundle) 12 | { 13 | base.OnCreate(bundle); 14 | TabLayoutResource = Resource.Layout.Tabbar; 15 | ToolbarResource = Resource.Layout.Toolbar; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MvxForms.Core/Pages/MvxFormsPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 13 | 14 | -------------------------------------------------------------------------------- /MvxForms.Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /MvxForms.Droid/Resources/layout/MainView.axml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 |