mvvmcross

WPF application using MVVMCROSS

爱⌒轻易说出口 提交于 2019-12-08 09:32:56
问题 I recently came across MVVMCROSS which I think is a very good idea to solve cross platform issues. So I was tempted to port over an application I was working on and my entire libraries to make them more portable. Now I am trying ti bind my viewmodels to the views and I am facing several issues and questions... I have seen the examples of how navigation works and how to start the first view which works fine. However, for my application I cannot use this.. My main view consists of a menu bar at

Android MVVM Cross v3 - How to Create a ListView with alternating row colours

佐手、 提交于 2019-12-08 09:09:16
问题 I'd like to create a ListView that has an alternating background colour for each row. I'm new to Android development in general, never mind Xamarin and MVVMCross as well :) There are some examples of doing this in the Android world and the Xamarin world, but I can't figure out how to set this up in an MVVM Cross way. My understanding is that I will need to implement this in the Android specific view code and to do that I will need to set some adapter on the ListView that can programatically

MvvmCross SQLite Plugin not working for UWP Project

那年仲夏 提交于 2019-12-08 09:07:07
问题 I am getting the following error when I try to run my UWP project: MvvmCross.Platform.Exceptions.MvxIoCResolveException: 'Failed to resolve parameter for parameter factory of type IMvxSqliteConnectionFactory when creating DebtBuddy.Core.Repositories.AccountRepository' My android project runs with no problems. The following is my repository class. public class AccountRepository : IAccountRepository { private readonly SQLiteConnection _connection; public AccountRepository

Who should create view model instances in MvvmCross

▼魔方 西西 提交于 2019-12-08 08:52:22
问题 Just to make it clear: I know MvvmCross is very flexible about where and how view models can be created. My question is more about proper separation of concerns, to simplify design of complex cross-platform applications. Consider we have an app with customer list and customer details. On iPad and Surface the list and details are shown on the same page, but on smaller devices customer list and details for a selected customer are split between separate pages. So we have a PCL with

MvvmCross Bindable MonoTouch.Dialog RadioElement

此生再无相见时 提交于 2019-12-08 08:42:53
问题 I am attempting to create a bindable RadioElement to use in a MonoTouch.Dialog implementation in MvvmCross, and following the pattern in https://github.com/MvvmCross/MvvmCross-Tutorials/tree/master/DialogExamples/DialogExamples.Touch/BindableElements (as suggested in MvvmCross Monotouch.Dialog binding data to a table), I created the following class: public class MvxBindableRadioElement : RadioElement, IBindableElement { public IMvxBindingContext BindingContext { get; set; } public

How to use MvxCachingFragmentActivity?

不羁岁月 提交于 2019-12-08 08:26:27
I'm trying to work with navigation with only Fragments, for tombestoning, saving total navigation stack and paramaters, etc. (working with Xamarin.Android and MVVMCross) I think MvxCachingFragmentActivity contains all needed parts. But I can't seem to get it to work and I can't find any example project that works with FullFragging. Closest thing is the example from Cheesebaron https://github.com/Cheesebaron/MvxFragmentsAndHamburger , after removing some comments to load the ViewModels it worked but not for FullFragging and total NavigationStack recovery after activity has been destroyed.

Passing Parameter From Main to Detail in MVVMCross

六月ゝ 毕业季﹏ 提交于 2019-12-08 08:15:02
问题 I am trying to pass the selected item from the list to the detail view, but myitem is null in the DetailViewmodel even though it is not in the MyViewModel . MyViewModel.cs public virtual ICommand ItemSelected { get { return new MvxCommand<MyViewModel>(item =>{SelectedItem = item;}); } } public MyViewModel SelectedItem { get { return _selectedItem; } set { _selectedItem = value; // myItem is NOT null here!!! ShowViewModel<MyDetailViewModel>(new { date = Date, myItem = _selectedItem });

how to use keypress events in mvvmcross for android?

寵の児 提交于 2019-12-08 08:06:15
问题 i have some problems trying to get the keyboard typing event ...so what i want is execute the command "GoContratoCommand" when the user press the "enter" button on the keyboard this is part of my ViewModel: using System; using System.Collections.Generic; using Cirrious.MvvmCross.ViewModels; using MultiPage.Core.Services; namespace MultiPage.Core.ViewModels { public class FirstViewModel : MvxViewModel { private Cirrious.MvvmCross.ViewModels.MvxCommand _goContratoCommand; public System.Windows

MVVMCROSS Ios Binding ShowViewModel

眉间皱痕 提交于 2019-12-08 07:53:15
问题 I've got problem with data-binding in mvvmcross after doing the navigation in the model by calling the showviewmodel-method. On the android side it works. So the Problem is, that the navigation itself is working but I don't get any data from the model. Navigation in the model: ShowViewModel<TeamEventDetailsViewModel>(new { eventID = item.ID }); ViewModel which containts the Data: public class TeamEventDetailsViewModel : EventDetailsViewModel { public TeamEventModel CurrentEvent { get { return

MvvmCross bind command with parameter in Windows Phone

蹲街弑〆低调 提交于 2019-12-08 07:36:08
问题 i am currently working on a simple app developped with Xamarin and MvvmCross. I have a simple list of items and i want a click on an item open a new view. I managed to do that in Android with : this code in the .axml of the view ListCustomersView.xaml <MvxListView android:minWidth="25px" android:minHeight="25px" android:layout_width="match_parent" android:layout_height="wrap_content" local:MvxItemTemplate="@layout/listcustomerscell" local:MvxBind="ItemsSource ListCustomers; ItemClick