mvvmcross

Show view from non-view/viewmodel in mvvmcross

不问归期 提交于 2019-12-18 12:24:30
问题 What is the correct way to open a View in mvvmcross from a non-view? From within a viewmodel we would use ShowViewModel<>(..). Specifically we are responding to a push notification opening the app (with a custom payload) which dictates a view that should be loaded. We have a hackety workaround just for proof of concept, just wanted to get an idea of the correct MVX approach 回答1: I don't think there is a 'correct way' - I think it depends on your app and what you need it to do. For some

MvvmCross Dialog

北城以北 提交于 2019-12-18 11:32:15
问题 I am currently investigating all possible solutions to be able to inform the user, ie pop a dialog, when there is a decision he needs to make. This is a common problem with MVVM pattern and I am trying to solve it for MvvmCross framework. Possible solutions could be: Customize the MvxPresenter to be able to show dialogs, but that looks a bit ugly to me Put a Dialog interface in the Core project and use Inversion of Control to inject the implementation from the UI project to the Core project

MvvmCross Monotouch - Fail to bind Properties on a real iPad, but it works on the Simulator

谁说胖子不能爱 提交于 2019-12-18 09:06:19
问题 I am working with MvvmCross Monotouch. Here is the Binding Code that actually works very well on the iOS Simulator. { this, "{'Title':{'Path':'NavigationBarTitle'}} However, it does not work when I deploy it on my real iPad (iPad 2). Application Output: =================== MvxBind: Warning: 0.69 Failed to create target binding for from NavigationBarTitle to Title I am glad to see it works on the iOS Simulator but, is there any reason why it does not work on the real iPad? Patrick 回答1: One

Insert a Monogame view inside MvvmCross monodroid Activity

风流意气都作罢 提交于 2019-12-18 07:08:53
问题 I'm trying to build a Monogame view inside a RelativeLayout from my MvvmCross monodroid Activity view. An android Activity inherits from Microsoft.Xna.Framework.AndroidGameActivity to be able to run a Monogame inside a RelativeLayout (working). My MvvmCross Activity inherits from MvxBindingActivityView(working). So, I need a way to run the game and bind some datas within the same activity. Thanks in advance for your help. 回答1: Loosely speaking, you can translate any Activity to an MvxActivity

Problems with mvvmcross Binding on IOS (Works on Simulator, but some properties doesn't work on the Device)

最后都变了- 提交于 2019-12-18 07:03:08
问题 The problem consists on the binding to a UIBarButtonItem, the code works on Simulator, but on the device the property Enable doesn't work and the Clicked Works… The same problem exists in the textViewItem, but this time neither the text or enable works. public partial class ProcessDetailViewController : MvxBindingTouchViewController<ProcessDetailViewModel> { public ProcessDetailViewController (MvxShowViewModelRequest request) : base (request,"ProcessDetailViewController", null) { } public

How do I update the parent viewmodel when child viewmodel is updated

杀马特。学长 韩版系。学妹 提交于 2019-12-18 05:22:47
问题 In my first view model (renamed to MainViewModel) I have a list of ActionViewModels. In my xaml i have a listbox which is bound to the list, in the listbox i have a template which binds to properties from the ActionViewModel. So far so good and everything works. When selecting one of the listitems i navigate to an ActionViewModel and pass the id with it. The ActionViewModel retrieves information from a static list in memory from which the MainViewModel also retrieved the information to create

Update UI thread from portable class library

荒凉一梦 提交于 2019-12-18 02:49:53
问题 I have an MVVM Cross application running on Windows Phone 8 which I recently ported across to using Portable Class Libraries. The view models are within the portable class library and one of them exposes a property which enables and disables a PerformanceProgressBar from the Silverlight for WP toolkit through data binding. When the user presses a button a RelayCommand kicks off a background process which sets the property to true which should enable the progress bar and does the background

Bind button click inside customlayout using mvvmcross and mvxlistview

南笙酒味 提交于 2019-12-17 21:32:12
问题 i wanted to bind a button click event inside my customlayout, below is my customlayout <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="63dp"> <LinearLayout android:orientation="horizontal" android:minWidth="25px" android:minHeight="25px" android:layout_width="match_parent" android:layout_height="match_parent" >

MVVMCross Bindings in Android

允我心安 提交于 2019-12-17 20:23:13
问题 I'm developing a cross-platform App starting it in android. I've found your MVVMCross project and I'm trying to get into it. Right now I'm totally new to it and don't know how to bind my WebService-Results to my ListView. Here a bit of XAML as example how I'm trying it: xmlns:mobsales="http://schemas.android.com/apk/res/MobSales.DroidUI" ... android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" mobsales:MvxItemTemplate="@layout/listitem

MVVMCross Bindings in Android

二次信任 提交于 2019-12-17 20:15:07
问题 I'm developing a cross-platform App starting it in android. I've found your MVVMCross project and I'm trying to get into it. Right now I'm totally new to it and don't know how to bind my WebService-Results to my ListView. Here a bit of XAML as example how I'm trying it: xmlns:mobsales="http://schemas.android.com/apk/res/MobSales.DroidUI" ... android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" mobsales:MvxItemTemplate="@layout/listitem