mvvmcross

Xamarin/MonoTouch: Unable to compile in “Link SDK only” mode due to missing symbols

浪尽此生 提交于 2019-12-19 17:33:55
问题 I am trying to compile my iOS application using MonoTouch in Link SDK only mode. It compiles completely fine if I turn off linking entirely but it also produces a colossal binary which is not suitable for release mode. Unfortunately, one of the libraries that I need somehow invokes Expression.Visit and I can't figure out how to instruct the linker to not strip it out. This results in this compilation error: Error MT2002: Failed to resolve "System.Linq.Expressions.Expression System.Linq

Xamarin.Android mvvmcross app crashes when launching with intent filter

只谈情不闲聊 提交于 2019-12-19 10:48:09
问题 When opening up the android application via a link, the android application crashes, with a NullReferenceExcetpion . The NRE happens in the base.OnCreate(bundle) method. The base is of type MvxFragmentCompatActivity . I have also tried this with a standard MvxActivity . I have had a look at the following questions (but to no avail) ViewModel null when Activity started from IntentFilter Open MvvmCross app via link with data The Activity [Activity(...)] [IntentFilter(new[] { Intent.ActionView }

MvvmCross: How to force a specific orientation on MvxViewController in iOS 7 on iPhone

Deadly 提交于 2019-12-19 10:07:29
问题 On my iOS 7 app, I only allow "Portrait" on "Supported Device Orientation" for entire application except I need to allow "Landscape" orientation on a "Video player" view. How can I do it with MvvmCross or MvxViewController? I have tried to set those ShouldAutorotate(), GetSupportedInterfaceOrientations() methods, it doesn't do anything. It keeps locked on Portrait mode for "Video player" view. Do anyone know what is the right way to set orientation on a View? public class VideoPlayerView :

Custom plugin in MVVMCross

孤街浪徒 提交于 2019-12-19 09:41:45
问题 I'm working on MVVMCross v3 and I want to create my own plugin, I followed this tutorial (which is for the vNext) http://slodge.blogspot.fr/2012/10/build-new-plugin-for-mvvmcrosss.html To be compatible for the v3 I changed IMvxServiceConsumer and GetService to Mvx.Resolve. But on the tutorial there are : Then, for WinRT, WindowsPhone and MonoTouch clients, you also need to provide a Loader accessor in setup.cs - like: protected override void AddPluginsLoaders(Cirrious.MvvmCross.Platform

MvvmCross ViewModel transition from the left

六月ゝ 毕业季﹏ 提交于 2019-12-19 04:19:09
问题 I am developing an app for iOS using MvvmCross. On one of my Views I have some basic report data that is displayed in a tableview. When the table row is touched a new view containing a detail report is displayed by making the call to ShowViewModel passing some parameters in a Dictionary. This works fine. When the user swipes left or right the app needs to show the detail report for the next or previous item in the original list. I am doing this by updating some parameters and calling

Using MvvmCross from content providers and activities

我怕爱的太早我们不能终老 提交于 2019-12-19 03:41:10
问题 I am trying to use MvvmCross v3 in one of my applications which consists of activities, content providers and broadcast receivers. However, I am not quite succeeding. The application consists of a Core PCL which contains logic, models and viewmodels and a Droid application which contains all MonoDroid-specific stuff. In Core I have an App:MvxApplication class and in Droid I have a Setup:MvxSetup class which creates an App-instance and initialises stuff. I can use the IOC parts with content

Returning values to 'parent' viewmodel in MvvmCross

谁都会走 提交于 2019-12-19 02:52:07
问题 What is the recommended method of passing a parameter from one viewmodel to another, modifying it then returning it to the original viewmodel? Much has been written about passing values in to views ie ShowViewModel(new{ paramX=valueY} ), however I am unable to find any working examples of having the displayed 'submodel' return a value back to the parent when it is closed/dismissed in some method. The only sample I've found which seems to cover this is http://www.gregshackles.com/2012/11

How to use the MvvmCross fluent API to bind a RecyclerView item's TextView to a property of its ViewModel on Android?

匆匆过客 提交于 2019-12-19 02:01:28
问题 I am using MvvmCross in my Xamarin Android project. I have an MvxActivity with an MvxRecyclerView , that I have assigned an item template in its layout file. <MvxRecyclerView android:id="@+id/my_recycler_view" local:MvxItemTemplate="@layout/item_recycler_view" /> The ViewModel is quite simple, it consists just of one property that holds the data to display in the RecyclerView : public class MainViewModel : MvxViewModel { private IEnumerable<ViewModelItem> _viewModelItems; public IEnumerable

Using AutoLayout to stack within two Columns of varying Heights

心已入冬 提交于 2019-12-18 15:29:13
问题 Targetting iOS 8.1 I am using AutoLayout to lay out a number of Labels in a TableCell. Some of those Labels are optional and some can wrap their Text. They are split across two "Columns", these columns are simply two UIViews in the TableCell's ContentView. My constraints are applied programatically. SECOND UPDATE Without SwiftArchitect's answer below I would not have solved this and have accepted his answer. However because mine is all in code, in a custom tablecell, I have also added a

Advice on where and when to use ObservableCollection in MvvmCross

假装没事ソ 提交于 2019-12-18 12:36:53
问题 In an MvvmCross solution I have a singleton Service class which gets items from a web service and updates a public ObservableCollection. It does this every five seconds and items may be added or removed or their properties changed. I also have a ViewModel which has a public property which is set to the Service's ObservableCollection. The View is bound to the ObservableCollection so that when items are added, removed or changed the view should update to show this. However, as expected, I am