FANDOM


You can find how to implement the different views for each platform here: http://slodge.blogspot.co.uk/2012/12/an-quick-start-on-creating-mvvmcross.html

To be able to add the Core project to all other UI projects you need to do some manual changes in the .csproj file, it needs to look somewhat similar to this: (The important lines are Italic / Bold)

 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
 <PropertyGroup>
   <Configuration Condition=" '$(Configuration)' ==  ">Debug</Configuration>
   <Platform Condition=" '$(Platform)' ==  ">AnyCPU</Platform>
   <ProjectGuid>{74F1BFAC-3EE3-46F9-AE0B-26A1C27E65DC}</ProjectGuid>
   <OutputType>Library</OutputType>
   <AppDesignerFolder>Properties</AppDesignerFolder>
   <RootNamespace>TealightV5</RootNamespace>
   <AssemblyName>TealightV5.Core</AssemblyName>
   <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
   <TargetFrameworkProfile Condition="'$(OS)' != 'Windows_NT'">Profile1</TargetFrameworkProfile>
   <TargetFrameworkProfile Condition="'$(OS)' == 'Windows_NT'">Profile104</TargetFrameworkProfile>
   <FileAlignment>512</FileAlignment>
   <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
   <ProductVersion>10.0.0</ProductVersion>
   <SchemaVersion>2.0</SchemaVersion>
 </PropertyGroup>


WinRT:

It's also usefull to copy the source of LayoutAwarePage and SuspensionManager from the twittersearch example. Also take note that when creating the View you don't leave in methods that override things from a base class but don't call base...

Android:

Follow the tutorial first, then add a Manifest in the properties of the android project. In the <manifest .....> line add the package name, something like this: package="com.tealightv5".

When you want to add a List to HomeView then you can use this code (Make sure the xmlns:local is directing to the package name you just entered in the manifest):

   <?xml version="1.0" encoding="utf-8"?> 
   <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:local="http://schemas.android.com/apk/res/com.tealightv5"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent">
   <TextView
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:text="Welcome to the HomeView ;)" />
   <Mvx.MvxBindableListView
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:cacheColorHint="#00000000"
       local:MvxBind="{'ItemsSource':{'Path':'ArticleList'}}" />
   </LinearLayout>

WPF

The important part when creating a WPF is that you need to REMOVE app.xaml and create a new one based on the code in the tutorial


Mac / Ios

See Mac for information how to set up the VM.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.