Merge pull request #2858 from andrewtechhelp/readmeupdate

Improve MvvmCross Getting Started Experience (ReadMe Content & Sample Files)
This commit is contained in:
Martijn van Dijk 2018-05-10 14:47:48 +02:00 коммит произвёл GitHub
Родитель d13d846a7a 1e6ec7efde
Коммит 68b680cfcb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
86 изменённых файлов: 1265 добавлений и 971 удалений

Просмотреть файл

@ -1,16 +1,18 @@
using Android.App;
using Android.OS;
using MvvmCross.Platforms.Android.Presenters.Attributes;
using MvvmCross.Platforms.Android.Views;
namespace $rootnamespace$.Views
{
[Activity(Label = "View for MainViewModel")]
public class MainView : MvxActivity
[MvxActivityPresentation]
[Activity(Label = "View for HomeViewModel")]
public class HomeView : MvxActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.MainView);
SetContentView(Resource.Layout.HomeView);
}
}
}

Просмотреть файл

@ -1,18 +0,0 @@
using Android.Content;
using MvvmCross.Platforms.Android.Core;
using MvvmCross.ViewModels;
namespace $rootnamespace$
{
public class Setup : MvxAndroidSetup
{
public Setup(Context applicationContext) : base(applicationContext)
{
}
protected override IMvxApplication CreateApp()
{
return new Core.App();
}
}
}

Просмотреть файл

@ -1,5 +1,6 @@
using Android.App;
using Android.Content.PM;
using MvvmCross.Platforms.Android.Core;
using MvvmCross.Platforms.Android.Views;
namespace $rootnamespace$
@ -7,14 +8,12 @@ namespace $rootnamespace$
[Activity(
Label = "$rootnamespace$"
, MainLauncher = true
, Icon = "@mipmap/icon"
, Theme = "@style/Theme.Splash"
, NoHistory = true
, ScreenOrientation = ScreenOrientation.Portrait)]
public class SplashScreen : MvxSplashScreenActivity
public class SplashScreen : MvxSplashScreenActivity<MvxAndroidSetup<Core.App>, Core.App>
{
public SplashScreen()
: base(Resource.Layout.SplashScreen)
: base(Resource.Layout.SplashScreen)
{
}
}

Просмотреть файл

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Splash" parent="android:Theme">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>

Просмотреть файл

@ -1,4 +0,0 @@
The steps to get this Android UI working are:
1. Add a reference to your Core .NET Standard project
2. Remove any old `MainLauncher` activities - eg Activity1 or MainActivity

Просмотреть файл

@ -1,14 +0,0 @@
The steps to get the presenters working:
1. Add following method override to your MvxSetup class (usually Setup.cs):
protected override IMvxAndroidViewPresenter CreateViewPresenter()
{
var presenter = new MvxFormsDroidPagePresenter();
Mvx.RegisterSingleton<IMvxPageNavigationHost>(presenter);
return presenter;
}
2. ??
3. Profit

Двоичные данные
ContentFiles/Android/splash.pdn

Двоичный файл не отображается.

Двоичные данные
ContentFiles/Android/splash.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.8 KiB

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#2196F3</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#1976D2</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#FF4081</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item>
</style>
</resources>

Просмотреть файл

@ -1,8 +1,10 @@
using MvvmCross.IoC;
using MvvmCross.ViewModels;
using $rootnamespace$.ViewModels;
namespace $rootnamespace$
{
public class App : MvvmCross.ViewModels.MvxApplication
public class App : MvxApplication
{
public override void Initialize()
{
@ -11,7 +13,7 @@ namespace $rootnamespace$
.AsInterfaces()
.RegisterAsLazySingleton();
RegisterAppStart<ViewModels.MainViewModel>();
RegisterAppStart<HomeViewModel>();
}
}
}

Просмотреть файл

@ -1,21 +1,10 @@
using MvvmCross.Commands;
using MvvmCross.ViewModels;
using System.Threading.Tasks;
namespace $rootnamespace$.ViewModels
{
public class MainViewModel : MvxViewModel
public class HomeViewModel : MvxViewModel
{
public MainViewModel()
{
}
public override Task Initialize()
{
//TODO: Add starting logic here
return base.Initialize();
}
public IMvxCommand ResetTextCommand => new MvxCommand(ResetText);
private void ResetText()
{

Просмотреть файл

@ -1,28 +0,0 @@
using Xamarin.Forms;
namespace $rootnamespace$.Pages
{
public class MainPage : ContentPage
{
public MainPage()
{
var content = new StackLayout
{
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center
};
var entry = new Entry();
entry.SetBinding(Entry.TextProperty, "Text");
var button = new Button();
button.Text = "Reset";
button.SetBinding(Button.CommandProperty, "ResetTextCommand");
content.Children.Add(entry);
content.Children.Add(button);
Content = content;
}
}
}

Просмотреть файл

@ -0,0 +1,11 @@
using Android.App;
using MvvmCross.Forms.Platforms.Android.Core;
using MvvmCross.Forms.Platforms.Android.Views;
namespace $rootnamespace$
{
[Activity(Label = "$rootnamespace$", MainLauncher = true, Theme = "@style/MainTheme", NoHistory = true)]
public class MainActivity : MvxFormsAppCompatActivity<MvxFormsAndroidSetup<Core.App, FormsUI.App>, Core.App, FormsUI.App>
{
}
}

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#2196F3</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#1976D2</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#FF4081</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item>
</style>
</resources>

Просмотреть файл

@ -1,15 +0,0 @@
using MvvmCross;
using MvvmCross.Forms.Core;
using MvvmCross.ViewModels;
using Xamarin.Forms;
namespace $rootnamespace$.Core
{
public partial class App : MvxFormsApplication
{
public App()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<d:MvxFormsApplication xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="$rootnamespace$.Core.App"
xmlns:d="clr-namespace:MvvmCross.Forms.Core;assembly=MvvmCross.Forms">
<Application.Resources>
<!-- Application resource dictionary -->
</Application.Resources>
</d:MvxFormsApplication>

Просмотреть файл

@ -1,18 +0,0 @@
using MvvmCross.IoC;
using MvvmCross.ViewModels;
namespace $rootnamespace$.Core
{
public class CoreApp : MvxApplication
{
public override void Initialize()
{
CreatableTypes()
.EndingWith("Service")
.AsInterfaces()
.RegisterAsLazySingleton();
RegisterNavigationServiceAppStart<ViewModels.MainViewModel>();
}
}
}

Просмотреть файл

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using MvvmCross.Forms.Views;
using $rootnamespace$.Core.ViewModels;
using Xamarin.Forms;
namespace $rootnamespace$.Core.Pages
{
public partial class MainPage : MvxContentPage<MainViewModel>
{
public MainPage()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<d:MvxContentPage x:TypeArguments="viewModels:MainViewModel"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:$rootnamespace$.Core.Pages"
x:Class="$rootnamespace$.Core.Pages.MainPage"
xmlns:viewModels="clr-namespace:$rootnamespace$.Core.ViewModels;assembly=$rootnamespace$.Core"
xmlns:d="clr-namespace:MvvmCross.Forms.Views;assembly=MvvmCross.Forms">
<ContentPage.Content>
<StackLayout>
<Button Text="Show text" Command="{Binding ShowTextCommand}" />
<Label Text="{Binding Text}" />
</StackLayout>
</ContentPage.Content>
</d:MvxContentPage>

Просмотреть файл

@ -1,30 +0,0 @@
using MvvmCross.ViewModels;
using System.Threading.Tasks;
namespace $rootnamespace$.Core.ViewModels
{
public class MainViewModel : MvxViewModel
{
private string _text;
private IMvxCommand _showTextCommand;
public IMvxCommand ShowTextCommand =>
_showTextCommand = _showTextCommand ?? new MvxCommand(DoShowTextCommand);
public string Text
{
get => _text;
set => SetProperty(ref _text, value);
}
public override Task Initialize()
{
return base.Initialize();
}
private void DoShowTextCommand()
{
Text = "Hello MvvmCross!";
}
}
}

Просмотреть файл

@ -1,23 +0,0 @@
The steps to get this Core project working are:
1. Add .Core to the name of the .NET Standard project.
2. Change the Build Action of the following files from 'Page' to 'Embedded Resource':
* Core|Pages|MainPage.xaml
* Core|App.xaml
3. Delete the page that was created by Xamarin forms.
4. Add the MvvmCross Forms StarterPack package to the platform specific projects.
5. In Android: Remove the MainActivity.cs.
6. In the platform specific projects remove the reference to the core project and click ok. Then add the reference again.
(This has to be done because the platform specific projects wont recognise the renamed core project)
7. In Android: in SplachScreen.cs change the label property in the attribute to your app name. Is now "YourAppName".
Note: It might be a good idea to manually remove the MvvmCross.Forms.StarterPack from the packages.config file,
otherwise your files will be overwritten the next time you update your nugets. The ToDo folder can also
be removed.

Просмотреть файл

@ -1,21 +0,0 @@
using Android.App;
using Android.Content.PM;
using Android.OS;
using MvvmCross;
using MvvmCross.Forms.Platforms.Android.Views;
using MvvmCross.Platforms.Android.Views;
namespace $rootnamespace$
{
[Activity(Label = "$rootnamespace$", Icon = "@drawable/icon", Theme = "@style/MyTheme",
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class FormsActivity : MvxFormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
}
}
}

Просмотреть файл

@ -1,27 +0,0 @@
using Android.Content;
using MvvmCross.Forms.Core;
using MvvmCross.Forms.Platforms.Android;
using MvvmCross.Forms.Platforms.Android.Core;
using MvvmCross.Platforms.Android.Core;
using MvvmCross.Platforms.Android.Views;
using MvvmCross.ViewModels;
namespace $rootnamespace$
{
public class Setup : MvxFormsAndroidSetup
{
public Setup(Context applicationContext) : base(applicationContext)
{
}
protected override MvxFormsApplication CreateFormsApplication()
{
return new Core.App();
}
protected override IMvxApplication CreateApp()
{
return new Core.CoreApp();
}
}
}

Просмотреть файл

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>

Просмотреть файл

@ -1,27 +0,0 @@
using Android.App;
using Android.Content.PM;
using MvvmCross.Platforms.Android.Views;
namespace $rootnamespace$
{
[Activity(
Label = "YourAppName"
, MainLauncher = true
, Icon = "@drawable/icon"
, Theme = "@style/Theme.Splash"
, NoHistory = true
, ScreenOrientation = ScreenOrientation.Portrait)]
public class SplashScreen : MvxSplashScreenActivity
{
public SplashScreen()
: base(Resource.Layout.SplashScreen)
{
}
protected override void TriggerFirstNavigate()
{
StartActivity(typeof(FormsActivity));
base.TriggerFirstNavigate();
}
}
}

Просмотреть файл

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Splash" parent="android:Theme">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>

Двоичные данные
ContentFiles/Forms/DroidContent/splash.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.2 KiB

Просмотреть файл

@ -0,0 +1,12 @@
using Xamarin.Forms;
namespace $rootnamespace$
{
public partial class App : Application
{
public App()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="$rootnamespace$.App">
<Application.Resources>
<!-- Application resource dictionary -->
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,12 @@
using MvvmCross.Forms.Views;
namespace $rootnamespace$.Views
{
public partial class HomeView : MvxContentPage
{
public HomeView()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<views:MvxContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:views="clr-namespace:MvvmCross.Forms.Views;assembly=MvvmCross.Forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:$rootnamespace$.Views"
x:Class="$rootnamespace$.Views.HomeView">
<Grid>
<StackLayout>
<Entry Text="{Binding Text, Mode=TwoWay}"></Entry>
<Button Text="Reset" Command="{Binding ResetTextCommand}"></Button>
</StackLayout>
</Grid>
</views:MvxContentPage>

Просмотреть файл

@ -0,0 +1,17 @@
using MvvmCross.Forms.Platforms.Uap.Core;
using MvvmCross.Forms.Platforms.Uap.Views;
namespace $rootnamespace$
{
sealed partial class App
{
public App()
{
this.InitializeComponent();
}
}
public abstract class UWPApplication : MvxWindowsApplication<MvxFormsWindowsSetup<Core.App, FormsUI.App>, Core.App, FormsUI.App, MainPage>
{
}
}

Просмотреть файл

@ -0,0 +1,7 @@
<local:UWPApplication
x:Class="$rootnamespace$.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:$rootnamespace$"
RequestedTheme="Light">
</local:UWPApplication>

Просмотреть файл

@ -0,0 +1,10 @@
namespace $rootnamespace$
{
public sealed partial class MainPage
{
public MainPage()
{
this.InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,14 @@
<forms:MvxFormsWindowsPage
xmlns:forms="using:MvvmCross.Forms.Platforms.Uap.Views"
x:Class="$rootnamespace$.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:$rootnamespace$"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
</Grid>
</forms:MvxFormsWindowsPage>

Просмотреть файл

@ -1,29 +1,10 @@
using Foundation;
using MvvmCross;
using MvvmCross.Forms.Platforms.Ios;
using MvvmCross.ViewModels;
using UIKit;
using MvvmCross.Forms.Platforms.Ios.Core;
namespace $rootnamespace$
{
[Register("AppDelegate")]
public partial class AppDelegate : MvxFormsApplicationDelegate
public partial class AppDelegate : MvxFormsApplicationDelegate<MvxFormsIosSetup<Core.App, FormsUI.App>, Core.App, FormsUI.App>
{
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
Window = new UIWindow(UIScreen.MainScreen.Bounds);
var setup = new Setup(this, Window);
setup.Initialize();
var startup = Mvx.Resolve<IMvxAppStart>();
startup.Start();
LoadApplication(setup.FormsApplication);
Window.MakeKeyAndVisible();
return base.FinishedLaunching(app, options);
}
}
}

Просмотреть файл

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace $rootnamespace$
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, "AppDelegate");
}
}
}

Просмотреть файл

@ -1,32 +0,0 @@
using MvvmCross.Forms.Platforms.Ios;
using MvvmCross.Forms.Platforms.Ios.Presenters;
using MvvmCross.Platforms.Ios.Core;
using MvvmCross.Platforms.Ios.Presenters;
using MvvmCross.ViewModels;
using UIKit;
namespace $rootnamespace$
{
public class Setup : MvxFormsIosSetup
{
public Setup(IMvxApplicationDelegate applicationDelegate, UIWindow window)
: base(applicationDelegate, window)
{
}
protected override MvvmCross.Forms.Platform.MvxFormsApplication CreateFormsApplication()
{
return new Core.App();
}
protected override IMvxApplication CreateApp()
{
return new Core.CoreApp();
}
protected override IMvxTrace CreateDebugTrace()
{
return new DebugTrace();
}
}
}

Просмотреть файл

@ -1,31 +0,0 @@
using AppKit;
using CoreGraphics;
using Foundation;
using MvvmCross;
using MvvmCross.Platforms.Mac.Core;
using MvvmCross.Platforms.Mac.Presenters;
using MvvmCross.ViewModels;
using ObjCRuntime;
using System;
namespace $rootnamespace$
{
public partial class AppDelegate : MvxApplicationDelegate
{
NSWindow _window;
public override void DidFinishLaunching(NSNotification notification)
{
_window = new NSWindow(new CGRect(200, 200, 400, 700), NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled,
NSBackingStore.Buffered, false, NSScreen.MainScreen);
var setup = new Setup(this, _window);
setup.Initialize();
var startup = Mvx.Resolve<IMvxAppStart>();
startup.Start();
_window.MakeKeyAndOrderFront(this);
}
}
}

Просмотреть файл

@ -1,34 +0,0 @@
using AppKit;
using Foundation;
using MvvmCross.Platforms.Mac.Binding.Views;
using System;
using System.Collections.Generic;
using System.Linq;
namespace $rootnamespace$.Views
{
public partial class MainView : MvxView
{
#region Constructors
// Called when created from unmanaged code
public MainView(IntPtr handle) : base(handle)
{
Initialize();
}
// Called when created directly from a XIB file
[Export("initWithCoder:")]
public MainView(NSCoder coder) : base(coder)
{
Initialize();
}
// Shared initialization code
void Initialize()
{
}
#endregion
}
}

Просмотреть файл

@ -1,61 +0,0 @@
using AppKit;
using Foundation;
using System;
using System.Collections.Generic;
using System.Linq;
using MvvmCross.Binding.BindingContext;
using MvvmCross.Platforms.Mac.Views;
using MvvmCross.ViewModels;
namespace $rootnamespace$.Views
{
[MvxViewFor(typeof(Core.ViewModels.MainViewModel))]
public partial class MainViewController : MvxViewController
{
#region Constructors
// Called when created from unmanaged code
public MainViewController(IntPtr handle) : base(handle)
{
Initialize();
}
// Called when created directly from a XIB file
[Export("initWithCoder:")]
public MainViewController(NSCoder coder) : base(coder)
{
Initialize();
}
// Call to load from the XIB/NIB file
public MainViewController() : base()
{
Initialize();
}
// Shared initialization code
void Initialize()
{
}
#endregion
// strongly typed view accessor
public new MainView View
{
get
{
return (MainView)base.View;
}
}
public override void ViewDidLoad()
{
base.ViewDidLoad ();
var set = this.CreateBindingSet<MainViewController, Core.ViewModels.MainViewModel>();
//set.Bind(textMain).To(vm => vm.Hello);
set.Apply();
}
}
}

Просмотреть файл

@ -1,21 +0,0 @@
using AppKit;
using Foundation;
using MvvmCross.Platforms.Mac.Core;
using MvvmCross.Platforms.Mac.Presenters;
using MvvmCross.ViewModels;
namespace $rootnamespace$
{
public class Setup : MvxMacSetup
{
public Setup(MvxApplicationDelegate applicationDelegate, NSWindow window)
: base(applicationDelegate, window)
{
}
protected override IMvxApplication CreateApp ()
{
return new Core.App();
}
}
}

Просмотреть файл

@ -1,49 +0,0 @@
NOTE
- Use Xamarin Studio for this...
0. Add a Xamarin.Mac Project
1. Add a reference to your Core .NET Standard project, e.g., <root>.Core
2. Right-click on the project and under Tools -> Edit File, then add <TargetFrameworkVersion>4.5</TargetFrameworkVersion> in the first PropertyGroup, this is needed to access PCLs using Profile 158
3. Use nuget to add the MvvmCross.Mac package
4. Verify the Setup.cs file (automatically created)
5. Replace the contents of AppDelegate.cs from AppDelegate.cs.txt
6. Delete MainWindow.cs, MainWindow.xib and MainWindowController.cs
7. Create a Views folder and add a Cocao View and Controller, if the ViewModel is "FirstViewModel", recommended naming for the View is "FirstView"
8. Edit FirstView.cs by adding the using statement below and changing the base type to MvxView
using MvvmCross.Platforms.Mac.Binding.Views;
public partial class FirstView : MvxView
9. Edit FirstViewController.cs by adding the using statements below, adding MvxViewFor and changing the base type to MvxViewController
using MvvmCross.Platforms.Mac.Views;
using MvvmCross.Binding.BindingContext;
using MvvmCross.ViewModels;
using <root>.Core.ViewModels;
[MvxViewFor(typeof(FirstViewModel))]
public partial class FirstViewController : MvxViewController
10. In FirstViewController.cs, override ViewDidLoad, add controls programmatically or in the .xib, then bind, e.g.,
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
...
var set = this.CreateBindingSet<FirstViewController, FirstViewModel> ();
set.Bind (textEditFirst).For(v => v.StringValue).To (vm => vm.FirstName);
set.Bind (textEditSecond).For(v => v.StringValue).To (vm => vm.LastName);
set.Bind (labelFull).For(v => v.StringValue).To (vm => vm.FullName);
set.Bind (bu).For("Activated").To ("GoCommand");
set.Apply ();
}
s
Where this requires using's of:
using <core>.Core.ViewModels;
using MvvmCross.Binding.BindingContext;
using MvvmCross.Platforms.Mac.Views;

Просмотреть файл

@ -0,0 +1,17 @@
using MvvmCross.Platforms.Uap.Core;
using MvvmCross.Platforms.Uap.Views;
namespace $rootnamespace$
{
sealed partial class App : UWPApplication
{
public App()
{
InitializeComponent();
}
}
public abstract class UWPApplication : MvxApplication<MvxWindowsSetup<Core.App>, Core.App>
{
}
}

Просмотреть файл

@ -0,0 +1,7 @@
<local:UWPApplication
x:Class="$rootnamespace$.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:$rootnamespace$"
RequestedTheme="Light">
</local:UWPApplication>

Просмотреть файл

@ -0,0 +1,12 @@
using MvvmCross.Platforms.Uap.Views;
namespace $rootnamespace$.Views
{
public sealed partial class HomeView : MvxWindowsPage
{
public HomeView()
{
this.InitializeComponent();
}
}
}

Просмотреть файл

@ -1,16 +1,17 @@
<views:MvxWindowsPage
x:Class="$rootnamespace$.Views.MainView"
xmlns:views="using:MvvmCross.Platforms.Uap.Views"
x:Class="$rootnamespace$.Views.HomeView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="$rootnamespace$.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="using:MvvmCross.Platforms.Uap.Views"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemneBrush}">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel>
<TextBox Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Button Content="Reset" Command="{x:Bind Vm.ResetTextCommand}" />
<Button Content="Reset" Command="{Binding ResetTextCommand}" />
</StackPanel>
</Grid>
</views:MvxWindowsPage>

Просмотреть файл

@ -1,14 +0,0 @@
using MvvmCross.Platforms.Uap.Views;
namespace $rootnamespace$.Views
{
public sealed partial class MainView : MvxWindowsPage
{
private MainViewModel Vm => (MainViewModel) ViewModel;
public MainView()
{
this.InitializeComponent();
}
}
}

Просмотреть файл

@ -1,18 +0,0 @@
using MvvmCross.Platforms.Uap.Core;
using MvvmCross.ViewModels;
using Windows.UI.Xaml.Controls;
namespace $rootnamespace$
{
public class Setup : MvxWindowsSetup
{
public Setup(Frame rootFrame) : base(rootFrame)
{
}
protected override IMvxApplication CreateApp()
{
return new Core.App();
}
}
}

Просмотреть файл

@ -1,45 +0,0 @@
The steps to get this UWP UI working are:
1. Add a reference to your Core .NET Standard project
2. Change App.Xaml.cs so that it creates a 'new Setup(RootFrame)' during its OnLaunched:
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
var rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialisation when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
var setup = new Setup(rootFrame);
setup.Initialize();
var start = MvvmCross.Platform.Mvx.Resolve<MvvmCross.Core.ViewModels.IMvxAppStart>();
start.Start();
}
// Ensure the current window is active
Window.Current.Activate();
}
}

Просмотреть файл

@ -1,16 +0,0 @@
The steps to get the presenters working:
1. Add following method override to your MvxSetup class (usually Setup.cs):
protected override IMvxPhoneViewPresenter CreateViewPresenter(PhoneApplicationFrame rootFrame)
{
Forms.Init();
var app = new MvxFormsApp();
return new MvxFormsWindowsPhonePagePresenter(app, rootFrame);
}
2. ??
3. Profit

Просмотреть файл

@ -0,0 +1,14 @@
using MvvmCross.Core;
using MvvmCross.Platforms.Wpf.Core;
using MvvmCross.Platforms.Wpf.Views;
namespace $rootnamespace$
{
public partial class App : MvxApplication
{
public App()
{
this.RegisterSetupType<MvxWpfSetup<Core.App>>();
}
}
}

Просмотреть файл

@ -0,0 +1,8 @@
<views:MvxApplication
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
x:Class="$rootnamespace$.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:$rootnamespace$"
StartupUri="MainWindow.xaml">
</views:MvxApplication>

Просмотреть файл

@ -0,0 +1,14 @@
using MvvmCross.Platforms.Wpf.Views;
using MvvmCross.ViewModels;
namespace $rootnamespace$.Views
{
[MvxViewFor(typeof(HomeViewModel))]
public partial class HomeView : MvxWpfView
{
public HomeView()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,17 @@
<views:MvxWpfView
x:Class="$rootnamespace$.Views.HomeView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:$rootnamespace$.Views"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<StackPanel>
<TextBox Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Button Content="Reset" Command="{Binding ResetTextCommand}" />
</StackPanel>
</Grid>
</views:MvxWpfView>

Просмотреть файл

@ -0,0 +1,12 @@
using MvvmCross.Platforms.Wpf.Views;
namespace $rootnamespace$
{
public partial class MainWindow : MvxWindow
{
public MainWindow()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,13 @@
<views:MvxWindow
x:Class="$rootnamespace$.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:$rootnamespace$"
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
</Grid>
</views:MvxWindow>

Просмотреть файл

@ -1,49 +0,0 @@
using MvvmCross
using MvvmCross.Platforms.Wpf.Views;
using MvvmCross.ViewModels;
using System;
using System.Windows;
namespace $rootnamespace$
{
public partial class App : Application
{
private bool _setupComplete;
private void DoSetup()
{
LoadMvxAssemblyResources();
var setup = new Setup(Dispatcher, MainWindow);
setup.Initialize();
var start = Mvx.Resolve<IMvxAppStart>();
start.Start();
_setupComplete = true;
}
protected override void OnActivated(EventArgs e)
{
if (!_setupComplete)
{
DoSetup();
}
base.OnActivated(e);
}
private void LoadMvxAssemblyResources()
{
for (var i = 0;; i++)
{
var key = "MvxAssemblyImport" + i;
var data = TryFindResource(key);
if (data == null)
{
return;
}
}
}
}
}

Просмотреть файл

@ -1,12 +0,0 @@
using MvvmCross.Platforms.Wpf.Views;
namespace $rootnamespace$.Views
{
public partial class MainView : MvxWpfView
{
public MainView()
{
this.InitializeComponent();
}
}
}

Просмотреть файл

@ -1,16 +0,0 @@
<views:MvxWpfView
x:Class="$rootnamespace$.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<StackPanel>
<TextBox Text="{Binding Text, Mode=TwoWay}" />
<Button Content="Reset" Command="{Binding ResetTextCommand }" />
</StackPanel>
</Grid>
</views:MvxWpfView>

Просмотреть файл

@ -1,22 +0,0 @@
using MvvmCross.Platforms.Wpf.Core;
using MvvmCross.Platforms.Wpf.Views;
using MvvmCross.ViewModels;
using System.Windows.Controls;
using System.Windows.Threading;
namespace $rootnamespace$
{
public class Setup
: MvxWpfSetup
{
public Setup(Dispatcher uiThreadDispatcher, ContentControl root)
: base(uiThreadDispatcher, root)
{
}
protected override IMvxApplication CreateApp()
{
return new Core.App();
}
}
}

Просмотреть файл

@ -1,3 +0,0 @@
The only step to get this Wpf .Net 4.5 UI working is:
1. Add a reference to your Core .NET Standard project

Просмотреть файл

@ -0,0 +1,10 @@
using Foundation;
using MvvmCross.Platforms.Ios.Core;
namespace $rootnamespace$
{
[Register("AppDelegate")]
public class AppDelegate : MvxApplicationDelegate<MvxIosSetup<Core.App>, Core.App>
{
}
}

Просмотреть файл

@ -1,29 +0,0 @@
using Foundation;
using MvvmCross;
using MvvmCross.Platforms.Ios.Core;
using MvvmCross.ViewModels;
using UIKit;
namespace $rootnamespace$
{
[Register("AppDelegate")]
public partial class AppDelegate : MvxApplicationDelegate
{
public override UIWindow Window { get; set; }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
Window = new UIWindow(UIScreen.MainScreen.Bounds);
var setup = new Setup(this, Window);
setup.Initialize();
var startup = Mvx.Resolve<IMvxAppStart>();
startup.Start();
Window.MakeKeyAndVisible();
return true;
}
}
}

Просмотреть файл

@ -5,9 +5,9 @@ using MvvmCross.Platforms.Ios.Views;
namespace $rootnamespace$.Views
{
[MvxRootPresentation(WrapInNavigationController = true)]
public partial class MainView : MvxViewController
public partial class HomeView : MvxViewController
{
public MainView() : base("MainView", null)
public HomeView() : base("HomeView", null)
{
}
@ -15,7 +15,7 @@ namespace $rootnamespace$.Views
{
base.ViewDidLoad();
var set = this.CreateBindingSet<MainView, Core.ViewModels.MainViewModel>();
var set = this.CreateBindingSet<HomeView, Core.ViewModels.HomeViewModel>();
set.Bind(TextField).To(vm => vm.Text);
set.Bind(Button).To(vm => vm.ResetTextCommand);
set.Apply();

Просмотреть файл

@ -11,8 +11,8 @@ using UIKit;
namespace $rootnamespace$.Views
{
[Register ("MainView")]
partial class MainView
[Register ("HomeView")]
partial class HomeView
{
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]

Просмотреть файл

@ -9,7 +9,7 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MainView">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HomeView">
<connections>
<outlet property="Button" destination="17" id="name-outlet-17"/>
<outlet property="TextField" destination="10" id="name-outlet-10"/>

Просмотреть файл

@ -38,7 +38,6 @@ namespace $YourNameSpace$
{
textField.Text = textField.Text + "";
textField.EditingChanged += (sender, args) => { textField.Text = ""; };
textField.EditingDidEnd += (sender, args) => { textField.Text = ""; };
}
public void Include(UITextView textView)
@ -136,10 +135,5 @@ namespace $YourNameSpace$
Console.ForegroundColor = ConsoleColor.Gray;
Console.ForegroundColor = ConsoleColor.DarkGray;
}
public void Include (MvvmCross.Plugin.Json.Plugin plugin)
{
plugin.Load();
}
}
}

Просмотреть файл

@ -1,25 +0,0 @@
using MvvmCross.Platforms.Ios.Core;
using MvvmCross.Platforms.Ios.Presenters;
using MvvmCross.ViewModels;
using UIKit;
namespace $rootnamespace$
{
public class Setup : MvxIosSetup
{
public Setup(IMvxApplicationDelegate applicationDelegate, UIWindow window)
: base(applicationDelegate, window)
{
}
public Setup(IMvxApplicationDelegate applicationDelegate, IMvxIosViewPresenter presenter)
: base(applicationDelegate, presenter)
{
}
protected override IMvxApplication CreateApp()
{
return new Core.App();
}
}
}

Просмотреть файл

@ -1,4 +0,0 @@
The steps to get this iOS UI working are:
1. Add a reference to your Core .NET Standard project
2. Modify AppDelegate.cs to create the new Setup and to call the IMvxAppStart - there is sample code for this in AppDelegate.cs.txt

Просмотреть файл

@ -1,16 +0,0 @@
The steps to get the presenters working:
1. Add following method override to your MvxSetup class (usually Setup.cs):
protected override IMvxIosViewPresenter CreatePresenter()
{
Forms.Init();
var app = new MvxFormsApp();
return new MvxFormsIosPagePresenter(Window, app);
}
2. ??
3. Profit

Просмотреть файл

@ -0,0 +1,15 @@
using Foundation;
using MvvmCross.Platforms.Mac.Core;
namespace $rootnamespace$
{
[Register("AppDelegate")]
public class AppDelegate: MvxApplicationDelegate<MvxMacSetup<Core.App>, Core.App>
{
public override void DidFinishLaunching(NSNotification notification)
{
MvxMacSetupSingleton.EnsureSingletonAvailable(this, MainWindow).EnsureInitialized();
RunAppStart();
}
}
}

Просмотреть файл

@ -0,0 +1,705 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" initialViewController="B8D-0N-5wS">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14109"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Application-->
<scene sceneID="JPo-4y-FX3">
<objects>
<application id="hnw-xV-0zn" sceneMemberID="viewController">
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>
<menuItem title="HomeView" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="HomeView" systemMenu="apple" id="uQy-DD-JDr">
<items>
<menuItem title="About HomeView" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Services" id="NMo-om-nkz">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
<menuItem title="Hide HomeView" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
</connections>
</menuItem>
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
</connections>
</menuItem>
<menuItem title="Show All" id="Kd2-mp-pUS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit HomeView" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="File" id="dMs-cI-mzQ">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="File" id="bib-Uj-vzu">
<items>
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
<connections>
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
</connections>
</menuItem>
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
<connections>
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
</connections>
</menuItem>
<menuItem title="Open Recent" id="tXI-mr-wws">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
<items>
<menuItem title="Clear Menu" id="vNY-rz-j42">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
<connections>
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
</connections>
</menuItem>
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
<connections>
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
</connections>
</menuItem>
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
<connections>
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
</connections>
</menuItem>
<menuItem title="Revert to Saved" id="KaW-ft-85H">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
</connections>
</menuItem>
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
<connections>
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Edit" id="5QF-Oa-p0T">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
<items>
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
<connections>
<action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
</connections>
</menuItem>
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
<connections>
<action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
<connections>
<action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
</connections>
</menuItem>
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
<connections>
<action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
</connections>
</menuItem>
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
<connections>
<action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
</connections>
</menuItem>
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
</connections>
</menuItem>
<menuItem title="Delete" id="pa3-QI-u2k">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
</connections>
</menuItem>
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
<connections>
<action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
<menuItem title="Find" id="4EN-yA-p0u">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Find" id="1b7-l0-nxx">
<items>
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
</connections>
</menuItem>
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
</connections>
</menuItem>
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
</connections>
</menuItem>
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
</connections>
</menuItem>
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
</connections>
</menuItem>
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
<connections>
<action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
<items>
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
<connections>
<action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
</connections>
</menuItem>
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
<connections>
<action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
</connections>
</menuItem>
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
</connections>
</menuItem>
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Substitutions" id="9ic-FL-obx">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
<items>
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
</connections>
</menuItem>
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
</connections>
</menuItem>
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
</connections>
</menuItem>
<menuItem title="Smart Links" id="cwL-P1-jid">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
</connections>
</menuItem>
<menuItem title="Data Detectors" id="tRr-pd-1PS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
</connections>
</menuItem>
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Transformations" id="2oI-Rn-ZJC">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
<items>
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
</connections>
</menuItem>
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
</connections>
</menuItem>
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Speech" id="xrE-MZ-jX0">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
<items>
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
</connections>
</menuItem>
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Format" id="jxT-CU-nIS">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
<items>
<menuItem title="Font" id="Gi5-1S-RQB">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
<items>
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq"/>
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27"/>
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq"/>
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
<connections>
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL"/>
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST"/>
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
<menuItem title="Kern" id="jBQ-r6-VK2">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
<items>
<menuItem title="Use Default" id="GUa-eO-cwY">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
</connections>
</menuItem>
<menuItem title="Use None" id="cDB-IK-hbR">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
</connections>
</menuItem>
<menuItem title="Tighten" id="46P-cB-AYj">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
</connections>
</menuItem>
<menuItem title="Loosen" id="ogc-rX-tC1">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Ligatures" id="o6e-r0-MWq">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
<items>
<menuItem title="Use Default" id="agt-UL-0e3">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
</connections>
</menuItem>
<menuItem title="Use None" id="J7y-lM-qPV">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
</connections>
</menuItem>
<menuItem title="Use All" id="xQD-1f-W4t">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Baseline" id="OaQ-X3-Vso">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
<items>
<menuItem title="Use Default" id="3Om-Ey-2VK">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
</connections>
</menuItem>
<menuItem title="Superscript" id="Rqc-34-cIF">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
</connections>
</menuItem>
<menuItem title="Subscript" id="I0S-gh-46l">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
</connections>
</menuItem>
<menuItem title="Raise" id="2h7-ER-AoG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
</connections>
</menuItem>
<menuItem title="Lower" id="1tx-W0-xDw">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
<connections>
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
</connections>
</menuItem>
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Text" id="Fal-I4-PZk">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Text" id="d9c-me-L2H">
<items>
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
<connections>
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
</connections>
</menuItem>
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
<connections>
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
</connections>
</menuItem>
<menuItem title="Justify" id="J5U-5w-g23">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
</connections>
</menuItem>
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
<connections>
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
<menuItem title="Writing Direction" id="H1b-Si-o9J">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
<items>
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="YGs-j5-SAR">
<string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
</connections>
</menuItem>
<menuItem id="Lbh-J2-qVU">
<string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
</connections>
</menuItem>
<menuItem id="jFq-tB-4Kx">
<string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="Nop-cj-93Q">
<string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
</connections>
</menuItem>
<menuItem id="BgM-ve-c93">
<string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
</connections>
</menuItem>
<menuItem id="RB4-Sm-HuC">
<string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
<menuItem title="Show Ruler" id="vLm-3I-IUL">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
</connections>
</menuItem>
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
</connections>
</menuItem>
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="View" id="H8h-7b-M4v">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="View" id="HyV-fh-RgO">
<items>
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
</connections>
</menuItem>
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Window" id="aUF-d1-5bR">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
<connections>
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="R4o-n2-Eq4">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Help" id="wpr-3q-Mcd">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="HomeView Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections>
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
<connections>
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
</connections>
</application>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="0.0"/>
</scene>
<!--Window Controller-->
<scene sceneID="R2V-B0-nI4">
<objects>
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
<connections>
<outlet property="delegate" destination="B8D-0N-5wS" id="tgX-NN-a8J"/>
</connections>
</window>
</windowController>
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="250"/>
</scene>
<!--Home View-->
<scene sceneID="hIz-AP-VOD">
<objects>
<viewController storyboardIdentifier="HomeView" id="XfG-lQ-9wD" customClass="HomeView" sceneMemberID="viewController">
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" misplaced="YES" id="r9L-ZQ-n9A">
<rect key="frame" x="203" y="117" width="75" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Reset" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HEh-z8-fXG">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<textField verticalHuggingPriority="750" misplaced="YES" id="C4d-u2-j7e">
<rect key="frame" x="91" y="208" width="299" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="XRv-BG-4ZI">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
<connections>
<outlet property="Button" destination="r9L-ZQ-n9A" id="kJB-gM-htO"/>
<outlet property="TextField" destination="C4d-u2-j7e" id="N2C-qL-DJX"/>
</connections>
</viewController>
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="655"/>
</scene>
</scenes>
</document>

Просмотреть файл

@ -0,0 +1,24 @@
using MvvmCross.Binding.BindingContext;
using MvvmCross.Platforms.Mac.Views;
using System;
namespace $rootnamespace$.Views
{
[MvxFromStoryboard("Home")]
public partial class HomeView : MvxViewController<HomeViewModel>
{
public HomeView(IntPtr handle) : base(handle)
{
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
var set = this.CreateBindingSet<HomeView, HomeViewModel>();
set.Bind(TextField).To(vm => vm.Text);
set.Bind(Button).To(vm => vm.ResetTextCommand);
set.Apply();
}
}
}

Просмотреть файл

@ -0,0 +1,34 @@
// WARNING
//
// This file has been generated automatically by Visual Studio to store outlets and
// actions made in the UI designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
using System.CodeDom.Compiler;
namespace $rootnamespace$.Views
{
[Register ("HomeView")]
partial class HomeView
{
[Outlet]
AppKit.NSButton Button { get; set; }
[Outlet]
AppKit.NSTextField TextField { get; set; }
void ReleaseDesignerOutlets ()
{
if (TextField != null) {
TextField.Dispose ();
TextField = null;
}
if (Button != null) {
Button.Dispose ();
Button = null;
}
}
}
}

Просмотреть файл

@ -0,0 +1,10 @@
using Foundation;
using MvvmCross.Platforms.Tvos.Core;
namespace $rootnamespace$
{
[Register("AppDelegate")]
public class AppDelegate : MvxApplicationDelegate<MvxTvosSetup<Core.App>, Core.App>
{
}
}

Просмотреть файл

@ -1,29 +0,0 @@
using Foundation;
using MvvmCross;
using MvvmCross.Platforms.Tvos.Core;
using MvvmCross.ViewModels;
using UIKit;
namespace $rootnamespace$
{
[Register("AppDelegate")]
public partial class AppDelegate : MvxApplicationDelegate
{
public override UIWindow Window { get; set; }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
Window = new UIWindow(UIScreen.MainScreen.Bounds);
var setup = new Setup(this, Window);
setup.Initialize();
var startup = Mvx.Resolve<IMvxAppStart>();
startup.Start();
Window.MakeKeyAndVisible();
return true;
}
}
}

Просмотреть файл

@ -12,7 +12,7 @@
<!--Main View-->
<scene sceneID="8OY-ej-oi3">
<objects>
<viewController storyboardIdentifier="MainView" id="eM6-9P-SPd" customClass="MainView" sceneMemberID="viewController">
<viewController storyboardIdentifier="HomeView" id="eM6-9P-SPd" customClass="HomeView" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jvB-0W-Ryd"/>
<viewControllerLayoutGuide type="bottom" id="Uti-bf-D7U"/>

Просмотреть файл

@ -4,11 +4,11 @@ using MvvmCross.Platforms.Tvos.Views;
namespace $rootnamespace$.Views
{
[MvxFromStoryboard("Main")]
[MvxFromStoryboard("Home")]
[MvxRootPresentation(WrapInNavigationController = true)]
public partial class MainView : MvxViewController
public partial class HomeView : MvxViewController
{
public MainView() : base("MainView", null)
public HomeView(IntPtr handle) : base(handle)
{
}
@ -16,7 +16,7 @@ namespace $rootnamespace$.Views
{
base.ViewDidLoad();
var set = this.CreateBindingSet<MainView, Core.ViewModels.MainViewModel>();
var set = this.CreateBindingSet<HomeView, Core.ViewModels.HomeViewModel>();
set.Bind(TextField).To(vm => vm.Text);
set.Bind(Button).To(vm => vm.ResetTextCommand);
set.Apply();

Просмотреть файл

@ -11,8 +11,8 @@ using UIKit;
namespace $rootnamespace$.Views
{
[Register ("MainView")]
partial class MainView
[Register ("HomeView")]
partial class HomeView
{
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]

Просмотреть файл

@ -1,30 +0,0 @@
using MvvmCross.Platforms.Tvos.Core;
using MvvmCross.Platforms.Tvos.Presenters;
using MvvmCross.ViewModels;
using UIKit;
namespace $rootnamespace$
{
public class Setup : MvxTvosSetup
{
public Setup(IMvxApplicationDelegate applicationDelegate, UIWindow window)
: base(applicationDelegate, window)
{
}
public Setup(IMvxApplicationDelegate applicationDelegate, IMvxIosViewPresenter presenter)
: base(applicationDelegate, presenter)
{
}
protected override IMvxApplication CreateApp()
{
return new Core.App();
}
protected override IMvxTvosViewPresenter CreatePresenter()
{
return new MvxTvosViewPresenter(ApplicationDelegate, Window);
}
}
}

Просмотреть файл

@ -1,4 +0,0 @@
The steps to get this tvOS UI working are:
1. Add a reference to your Core .NET Standard project
2. Modify AppDelegate.cs to create the new Setup and to call the IMvxAppStart - there is sample code for this in AppDelegate.cs.txt

Просмотреть файл

@ -2,36 +2,76 @@
MvvmCross
---------------------------------
IMPORTANT: No nuget content files will be installed!
IMPORTANT: No NuGet content files will be installed!
Files to change yourself in every platform project:
--- Quick steps to get MvvmCross with MvvmCross.Forms up and running ---
The following steps should get MvvmCross with MvvmCross.Forms to load in a newly created project.
MvvmCross provides a lot more features that are not discussed in this readme, this will get you a bare-bones setup.
See the documentation at https://www.mvvmcross.com/ to learn how to make full use of the featureset MvvmCross provides.
- Core
* Add App.cs
-- Assumptions --
- All app platforms
* Add Setup.cs
1. Your solution already has a .NET Standard 2.x project where shared code will be located (often referred to as the Core project).
2. Your solution already has a platform specific project for every platform you wish to support.
Platforms include Xamarin.iOS, Xamarin.Android and Universal Windows Platform (UWP).
3. Your solution already has an additional .NET Standard 2.x project where your Xamarin.Forms views will be located (often referred to as the Xamarin.Forms UI project).
4. You have added the MvvmCross NuGet package (MvvmCross) to to all projects in your solution.
5. You have added the Xamarin.Forms NuGet package (Xamarin.Forms) to to all the platform specific projects & the Xamarin.Forms UI project.
6. You have added this NuGet package (MvvmCross.Forms) to to all the platform specific projects & the Xamarin.Forms UI project.
7. Each of the platform specific projects and the Xamarin.Forms UI project has a reference to the Core project.
8. Each of the platform specific projects also has a reference to the Xamarin.Forms UI project.
- Android, iOS, tvOS, MacOS
* Add LinkerPleaseInclude.cs
-- Changes to make to your project (Xamarin.Forms Based Solution) --
- Android
* Extend MainActivity from MvxFormsAppCompatActivity. ( MainActivity : MvxFormsAppCompatActivity { } )
* Add SplashScreen.cs if you want a splashscreen
NOTE: These instructions are for projects that wish to use Xamarin.Forms instead of a traditional Xamarin setup (that is, user interfaces written in each platform's project using that platform's UI tooling/markup).
Xamarin.Forms allows you to write shared code for your user interfaces with the Xamarin.Forms framework generating native looking user interfaces for each platform.
- iOS, MacOS, tvOS
* Extend AppDelegate from MvxFormsAppDelegate. ( AppDelegate : MvxFormsAppDelegate { } )
- UWP, WPF
* Extend App from MvxApplication. ( App : MvxApplication { } )
Sample files are available at:
Samples of all files referenced below can be found here:
https://github.com/MvvmCross/MvvmCross/blob/develop/ContentFiles/
Changelog:
Most of these sample files can be copied directly into a newly created solution and will work.
However, any $rootnamespace$ instances will need to be changed to your project's namespace and you will also need to add appropriate using statements (Visual Studio IntelliSense should suggest these).
- Core project -
1. Add an App class to the root folder (See Core/App.cs.pp in sample files).
2. Add a ViewModels folder to the root of the project and add at least one ViewModel class to this folder (See Core/HomeViewModel.cs.pp in sample files).
- Xamarin.Forms UI project -
1. Add the App.xaml and App.xaml.cs files to the root folder. These are just the standard files that Xamarin.Forms projects use, they don't have any MvvmCross specific modifications.
(See Forms/FormsUIContent/App.xaml.pp and Forms/FormsUIContent/App.xaml.cs.pp in sample files).
2. Add a Views folder and add at least one XAML page to this folder to correspond to the ViewModel in the Core project (See Forms/FormsUIContent/HomeView.xaml.pp in sample files).
3. Inside the .xaml.cs file that is created when a new XAML page is added, change the class to inherit from MvxContentPage (See Forms/FormsUIContent/HomeView.xaml.cs.pp in sample files).
- Android project (ignore if not building for Android) -
1. Add a reference to the Mono.Android.Export assembly.
2. Inside MainActivity.cs, change the MainActivity class to inherit from MvxFormsAppCompatActivity<MvxFormsAndroidSetup<Core.App, FormsUI.App>, Core.App, FormsUI.App> instead of Activity (See Forms/AndroidContent/MainActivity.cs.pp in sample files).
3. Still inside MainActivity, delete all the pre-populated methods to leave a blank class.
4. Add a new XML file that defines an AppCompat theme to the Resources/values folder called styles.xml. (See Forms/AndroidContent/styles.xml.pp in sample files)
5. Ensure the theme created in the previous step is referenced in the Attribute for the MainActivity class (See Forms/AndroidContent/MainActivity.cs.pp in sample files).
- iOS projects (ignore if not building for iOS) -
1. Inside AppDelegate.cs, change the AppDelegate class to inherit from MvxFormsApplicationDelegate<MvxFormsIosSetup<Core.App, FormsUI.App>, Core.App, FormsUI.App> instead of ApplicationDelegate (See Forms/iOSContent/AppDelegate.cs.pp in sample files).
2. Still inside AppDelegate, delete all the pre-populated methods to leave a blank AppDelegate class.
- Universal Windows Platform (UWP) projects (ignore if not building for UWP) -
1. Inside App.xaml.cs add a new partial class called UWPApplication that inherits from MvxWindowsApplication<MvxFormsWindowsSetup<Core.App, FormsUI.App>, Core.App, FormsUI.App, MainPage> (See Forms/UWPContent/App.xaml.cs.pp in sample files).
2. Still inside App.xaml.cs change the App class to inherit from UWPApplication class created in the previous step (See Forms/UWPContent/App.xaml.cs.pp in sample files).
3. Still inside App.xaml.cs remove all the methods inside the App class except for the constructor. Delete everything except InitializeComponent(); from the constructor (See Forms/UWPContent/App.xaml.cs.pp in sample files).
4. Inside App.xaml change the Application XML tag to local:UWPApplication (See Forms/UWPContent/App.xaml.pp in sample files).
5. Inside MainPage.xaml change the Page XML tag to forms:MvxFormsWindowsPage and add xmlns:forms="using:MvvmCross.Forms.Platforms.Uap.Views" to that XML tag (See Forms/UWPContent/MainPage.xaml.pp in sample files).
6. Inside MainPage.xaml.cs remove the inherritance from the MainPage class so it doesn't inherit from the Page class (See Forms/UWPContent/MainPage.xaml.cs.pp in sample files).
--- Changelog ---
https://github.com/MvvmCross/MvvmCross/blob/develop/CHANGELOG.md
For complete startup documentation you can read more on our website:
--- More information ---
This readme contains the bare bones instructions for setting up MvvmCross in a new solution. For complete startup documentation you can read more on our website:
Getting Started Documentation:
https://www.mvvmcross.com/documentation/getting-started/getting-started

Просмотреть файл

@ -2,36 +2,108 @@
MvvmCross
---------------------------------
IMPORTANT: No nuget content files will be installed!
IMPORTANT: No NuGet content files will be installed!
Files to change yourself in every platform project:
--- Quick steps to get MvvmCross up and running ---
The following steps should get MvvmCross to load in a newly created project.
MvvmCross provides a lot more features that are not discussed in this readme, these steps will just get you a bare-bones setup.
See the documentation at https://www.mvvmcross.com/ to learn how to make full use of the featureset MvvmCross provides.
- Core
* Add App.cs
-- Assumptions --
- All app platforms
* Add Setup.cs
1. Your solution already has a .NET Standard 2.x project where shared code will be located (often referred to as the Core project).
2. Your solution already has a platform specific project for every platform you wish to support.
Platforms include Xamarin.iOS, Xamarin.Android, Xamarin.Mac, Xamarin.tvOS, Universal Windows Platform (UWP) and Windows Presentation Foundation (WPF).
3. You have added this NuGet package (MvvmCross) to to all projects in your solution.
4. Each of the platform specific projects have a reference to the Core project.
- Android, iOS, tvOS, MacOS
* Add LinkerPleaseInclude.cs
-- Changes to make to your project (Traditional Xamarin Solution - No Xamarin.Forms) --
- Android
* Extend MainActivity from MvxAppCompatActivity. ( MainActivity : MvxAppCompatActivity { } )
* Add SplashScreen.cs if you want a splashscreen
NOTE: These instructions are for projects that wish to use a traditional Xamarin setup (that is, user interfaces written in each platform's project using that platform's UI tooling/markup).
If you wish to use Xamarin.Forms to write shared code for your user interfaces, disregard the rest of these instructions, install the MvvmCross.Forms NuGet package and follow the instructions
in the Readme file included in that NuGet package instead. An MvvmCross project with Xamarin.Forms requires a slightly different setup and therefore has a different set of instructions to this Readme.
- iOS, MacOS, tvOS
* Extend AppDelegate from MvxAppDelegate. ( AppDelegate : MvxAppDelegate { } )
- UWP, WPF
* Extend App from MvxApplication. ( App : MvxApplication { } )
Sample files are available at:
Samples of all files referenced below can be found here:
https://github.com/MvvmCross/MvvmCross/blob/develop/ContentFiles/
Changelog:
Most of these sample files can be copied directly into a newly created solution and will work.
However, any $rootnamespace$ instances will need to be changed to your project's namespace and you will also need to add appropriate using statements (Visual Studio IntelliSense should suggest these).
- Core project -
1. Add an App class to the root folder (See Core/App.cs.pp in sample files).
2. Add a ViewModels folder to the root of the project and add at least one ViewModel class to this folder (See Core/HomeViewModel.cs.pp in sample files).
- Android projects (ignore if not building for Android) -
1. Add a reference to the Mono.Android.Export assembly.
2. Delete MainActivity.cs, and add a new activity class called SplashScreen to the root folder.
3. Change the SplashScreen activity class to inherit from MvxSplashScreenActivity<MvxAndroidSetup<Core.App>, Core.App> instead of Activity (See Android/SplashScreen.cs.pp in sample files).
4. Add a new Android layout to the Resources/layout folder to correspond to the SplashScreen created in the previous step. (See Android/SplashScreen.axml.pp in sample files).
5. Add a Views folder to the root of the project and add at least one View class to this folder to correspond to the ViewModel class in the Core project (See Android/HomeView.cs.pp in sample files).
6. Add a new Android layout to the Resources/layout folder to correspond to the View class created in the previous step. (See Android/HomeView.axml.pp in sample files).
Note: If you wish to use the AppCompat versions of Android classes, you can follow the above instructions with the following modifications
7. Add the MvvmCross v7 Android AppCompat Support Libraries NuGet package (MvvmCross.Droid.Support.v7.AppCompat) to to your Android platform specific project.
8. When changing the the inheritance for the SplashScreen activity class, use MvxSplashScreenAppCompatActivity instead of MvxSplashScreenActivity.
9. Add a new XML file that defines an AppCompat theme to the Resources/values folder called styles.xml. (See Android/styles.xml.pp in sample files)
10. Ensure the theme created in the previous step is referenced in the Attribute for the MainActivity class (Theme = "@style/MainTheme").
- iOS projects (ignore if not building for iOS) -
1. Inside AppDelegate.cs, change the AppDelegate class to inherit from MvxApplicationDelegate<MvxIosSetup<Core.App>, Core.App> instead of ApplicationDelegate (See iOS/AppDelegate.cs.pp in sample files).
2. Still inside AppDelegate.cs, delete all the pre-populated methods to leave a blank AppDelegate class.
3. Add a Views folder to the root of the project and add at least one View class to this folder to correspond to the ViewModel class in the Core project (See iOS/HomeView.cs.pp in sample files).
4. Add a new iOS Interface Builder layout (XIB) or StoryBoard file to the Views folder to correspond to the View created in the previous step. (See iOS/HomeView.xib.pp in sample files).
- macOS projects (ignore if not building for macOS) -
1. Inside AppDelegate.cs, change the AppDelegate class to inherit from MvxApplicationDelegate<MvxMacSetup<Core.App>, Core.App> instead of ApplicationDelegate (See macOS/AppDelegate.cs.pp in sample files).
2. Still inside AppDelegate.cs replace the contents of the DidFinishLaunching method with the following:
MvxMacSetupSingleton.EnsureSingletonAvailable(this, MainWindow).EnsureInitialized();
RunAppStart();
3. Still inside AppDelegate, delete all the other pre-populated methods.
4. Add a Views folder and add at least one View file to this folder to correspond to the ViewModel in the Core project (See macOS/HomeView.cs.pp in sample files).
5. Add a new iOS Interface Builder layout (XIB) or StoryBoard file to the Views folder to correspond to the View created in the previous step. (See macOS/Home.storyboard.pp in sample files).
- tvOS projects (ignore if not building for tvOS) -
1. Inside AppDelegate.cs, change the AppDelegate class to inherit from MvxApplicationDelegate<MvxTvosSetup<Core.App>, Core.App> instead of ApplicationDelegate (See tvOS/AppDelegate.cs.pp in sample files).
2. Still inside AppDelegate.cs, delete all the pre-populated methods to leave a blank AppDelegate class.
3. Add a Views folder and add at least one View file to this folder to correspond to the ViewModel in the Core project (See tvOS/HomeView.cs.pp in sample files).
4. Add a new iOS Interface Builder layout (XIB) or StoryBoard file to the Views folder to correspond to the View created in the previous step. (See tvOS/Home.storyboard.pp in sample files).
- Universal Windows Platform (UWP) projects (ignore if not building for UWP) -
1. Inside App.xaml.cs add a new partial class called UWPApplication that inherits from MvxApplication<MvxWindowsSetup<Core.App>, Core.App> (See UWP/App.xaml.cs.pp in sample files).
2. Still inside App.xaml.cs change the App class to inherit from UWPApplication class created in the previous step (See UWP/App.xaml.cs.pp in sample files).
3. Still inside App.xaml.cs remove all the methods inside the App class except for the constructor. Delete everything except InitializeComponent(); from the constructor (See UWP/App.xaml.cs.pp in sample files).
4. Inside App.xaml change the Application XML tag to local:UWPApplication (See UWP/App.xaml.pp in sample files).
5. Add a Views folder to the root of the project and add at least one XAML page to this folder to correspond to the ViewModel class in the Core project. (See UWP/HomeView.xaml.pp in sample files).
6. Inside the .xaml file that is created when a new XAML page is added, change the Page XML tag to views:MvxWindowsPage and add xmlns:views="using:MvvmCross.Platforms.Uap.Views" to that XML tag.
7. Inside the .xaml.cs file that is created when a new XAML page is added, change the class to inherit from MvxWindowsPage (See UWP/HomeView.xaml.cs.pp in sample files).
- Windows Presentation Foundation (WPF) projects (ignore if not building for WPF) -
1. Add the MVVMCross WPF Platform NuGet package (MvvmCross.Platforms.Wpf) to your WPF platform specific project.
2. Inside App.xaml.cs change the App class to inherit from MvxApplication (See WPF/App.xaml.cs.pp in sample files).
3. Still inside App.xaml.cs add a constructor to the App class with the following line of code: this.RegisterSetupType<MvxWpfSetup<Core.App>>(); (See WPF/App.xaml.cs.pp in sample files).
4. Inside App.xaml change the Application XML tag to views:MvxApplication (See WPF/App.xaml.pp in sample files).
5. Still inside App.xaml add xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf" to the views:MvxApplication tag (See WPF/App.xaml.pp in sample files).
6. Add a Views folder to the root of the project and add at least one XAML page to this folder to correspond to the ViewModel class in the Core project (See WPF/HomeView.xaml.pp in sample files).
7. Inside the .xaml file that is created when a new XAML page is added, change the Page XML tag to views:MvxWpfView (See WPF/HomeView.xaml.pp in sample files).
8. Still inside the .xaml file that is created when a new XAML page is added add xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf" to the views:MvxWpfView tag (See WPF/HomeView.xaml.pp in sample files).
9. Inside the .xaml.cs file that is created when a new XAML page is added, change the class to inherit from MvxWpfView (See WPF/HomeView.xaml.cs.pp in sample files).
10. Inside MainWindow.xaml change the Application XML tag to views:MvxWindow (See WPF/MainWindow.xaml.pp in sample files).
11. Still inside MainWindow.xaml add xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf" to the views:MvxWindow tag (See WPF/MainWindow.xaml.pp in sample files).
12. Inside MainWindow.xaml.cs change the MainWindow class to inherit from MvxWindow (See WPF/MainWindow.xaml.cs.pp in sample files).
--- Changelog ---
https://github.com/MvvmCross/MvvmCross/blob/develop/CHANGELOG.md
For complete startup documentation you can read more on our website:
--- More information ---
This readme contains the bare bones instructions for setting up MvvmCross in a new solution. For complete startup documentation you can read more on our website:
Getting Started Documentation:
https://www.mvvmcross.com/documentation/getting-started/getting-started