mvvmcross

After updating MvvmCross 5.2 I have error Fragment already active

隐身守侯 提交于 2019-12-11 15:30:52
问题 I have a problem after updating to the new MvvmCross 5.2 . I have forced uninstalled MvvmCross.Droid.Shared and after update all packages. I then got some errors with MvxFragment , so I replaced it with MvxFragmentPresentation . Additionally, I replaced MvxCachingFragmentCompatActivity with MvxAppCompatActivity and I'm now using the new MvxAppCompatViewPresenter . All works well, and the app running good. Except after I select logout in menu I'm taken to the LoginViewModel and when I want

MVVM Cross - passing parameters

一笑奈何 提交于 2019-12-11 15:05:57
问题 I'm trying to pass objects across view models in MVVM Cross. Here's the code for the VM that I'm passing from: private void CallVM2() { MyObj newObj = new Myobj(); IMyService myService = new MyService(); Dictionary<string, object> p = new Dictionary<string, object>() { {"MyObj", newObj}, {"MyService", myService} }; ShowViewModel<ViewModel2>(p); } And here's the code for ViewModel2: public void Init(Dictionary<string, object> p) { } Okay - so I tried InitFromBundle too, but it appears that I

Achieve MvxListView alternate row background images if itemsource binding from viewmodel

蹲街弑〆低调 提交于 2019-12-11 14:57:18
问题 I am newbie in Xamarin Android and MvvmCross and I have been trying to achieve alternate rows background for MvxListView. Below is my code for MvxListView <Mvx.MvxListView android:layout_width="fill_parent" android:layout_height="fill_parent" android:divider="@null" android:layout_centerHorizontal="true" android:layout_alignParentTop="true" android:layout_above="@+id/llSubtotal" android:cacheColorHint="@android:color/transparent" local:MvxBind="ItemsSource Items;ItemClick ItemSelectedCommand"

MVVMCross - SqlBits Memory Leak

怎甘沉沦 提交于 2019-12-11 14:32:22
问题 We are developing an Monotouch application with MVVMCross similar to SqliBits sample (the UINavigationCOntroller has a tab controller and inside the tab controller there is anothe navigation controller). It seems that the memory gets allocated but never released. To reproduce this error launch the SqliBits sample with the profiler select Sessions tab and then select a day go back, select a day go back,... and then look at the memory allocation and you will see that trhe memory gets allocated

How can I get an element with 2 buttons side by side?

北城余情 提交于 2019-12-11 14:21:05
问题 I need to have a Monotouch.Dialog element with 2 buttons side by side using MvvmCross Has anyone managed this? I have this so far but know it's not going to work as I have no way of knowing which button was tapped: public class DoubleButton : Element, IElementSizing{ UIImage image1; UIImage image2; public DoubleButton (UIImage image1,UIImage image2, string caption): base(caption) { this.image1 = image1; this.image2 = image2; } protected override UITableViewCell GetCellImpl (UITableView tv) {

How do I teach Automapper to map X to IContainer<Y>?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 14:09:12
问题 This came up mapping from models to mvvmcross viewmodels, where you have some container classes you might use, for example: namespace MvvmCross.Binding { interface INC<T> { T Value { get; set; } } } class model { String name { get; set; } DateTime when { get; set; } othermodel data { get; set; } } class viewmodel { INC<String> Name { get; set; } INC<String> When { get; set; } INC<otherviewmodel> Data { get; set; } } I need to teach AutoMapper to map from A to INC<B> (and back), without

MVVMCross: Is it possible to use Storyboard with ICommand navigation?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 13:25:07
问题 I've spent the last few days trying to figure out a way to get around the warning: mvx: Warning: 8.93 Exception masked MissingMethodException: Default constructor not found for type FCX.iOS.TimesheetView at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00094] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Activator.cs:326 at System.Activator.CreateInstance (System.Type type) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Activator

Procedure for creating an MvvmCross Store application for Windows 8.1 from scratch?

我们两清 提交于 2019-12-11 13:19:07
问题 Using Visual Studio 2013, I am creating a new Windows Store application for Windows 8.1 based on MvvmCross . I first create my PCL .Core class library with view models according to the instructions in the Core.txt to-do file. Next, I create my .Store application, now following the instructions in the Windows Store UI.txt to-do file. I do want to use the navigation framework, so I am replacing the FirstView.xaml page with a Basic Page FirstView.xaml . According to the instructions, the

MvxCachingFragmentCompatActivity refresh cached fragment

给你一囗甜甜゛ 提交于 2019-12-11 13:16:26
问题 I have a project based off the XPlatformMenus MvvmCross sample. The app is using one activity inherited from MvxCachingFragmentCompatActivity . The app uses a NavigationView sliding drawer to allow navigation to different fragments that are swapped out at runtime. I have one fragment which displays a list using RecyclerView . I can scroll down to the bottom of the list, hit the back button, then invoke the fragment again from the navigation menu, and the fragment is displayed exactly as it

Issue binding to MVXSpinner after upgrading to Mvvmcross v4.0.0-beta3

孤街醉人 提交于 2019-12-11 12:25:40
问题 I just updated all of my Mvvmcross libraries to version 4.0.0-beta3 and it looks like it may have broken the binding of the MVXSpinner. I get the following message in the output: MvxBind:Warning: 5.40 Failed to create target binding for binding SelectedItem for SelectedColor Here is the xml: <MvxSpinner android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/colorSpinner" android:spinnerMode="dropdown" android:layout_below="@id/maintoolbar" local:MvxBind=