mvvmcross

Does MvvmCross work in Xamarin Studio?

Deadly 提交于 2019-12-21 17:48:49
问题 I'm having a time getting a straight answer on this, I've done a lot of searches and reading, and tried a lot of stuff. It sometimes sounds possible and other times only sounds possible by doing linking and what-not, which is something I'm trying to avoid. I'm a big fan of PCLs. I've created a solution using Visual Studio 2012, Xamarin, and MvvmCross which works great, I can deploy to an iOS device, a Droid device, Windows --- what have you. Visual Studio can build working applications that I

Android App is too large and Linking disables functionality

﹥>﹥吖頭↗ 提交于 2019-12-21 10:48:03
问题 I'm done with my app and now I'm trying to build the .apk and test it on my phone (without debug, in release mode). Setting the Linking to " None " everything works fine. The Problem here is, that the App is too large - its 20MB and thats rubbish. I read that article about Linking: Click Here So I tried " Sdk Assemblies Only " and " Sdk and User Assemblies ". The second option (Both Assemblies) failed directly, I wasn't even able to see the first screen (Login) of my App. With Linking set to

How do I specify a view to be pushed as Modal in MvvmCross?

徘徊边缘 提交于 2019-12-21 05:31:30
问题 I have a view in a MonoTouch app using MvvmCross framework that I would like displayed Modal (NavigationController.PresentModalViewController). 回答1: MvvmCross starts from the premise that all ViewModels are just "normal pages" - so in iOS/MonoTouch that means UIViewControllers presented using a UINavigationController. To move away from this premise - towards tabbed displays, modal displays, split controllers, popups, etc - then you can adjust the Presenter logic within your MonoTouch app. The

What class to inherit from for bound table source

ⅰ亾dé卋堺 提交于 2019-12-20 09:25:49
问题 I'm using Xamarin and mvvmcross and what to have a view with a table ultimately bound to an observable collection. This video is very informative on how to create custom cells, but appears to be out-of-date. At around 42 minutes, Stuart creates a data source for his table that derives from MvxSimpleBindableTableSource , but that class doesn't seem to exist, or at least, I can't find it. So what is the "best" way to bind to a UITableView with mvvmcross? Also, I'm using a UITableView in a

MVVMCross Binding decimal to UITextField removes decimal point

吃可爱长大的小学妹 提交于 2019-12-20 04:39:08
问题 Binding a decimal to a UITextField does not let you put a "." in, as you type "1.", the push to source strips it out. I get why it happens, MakeSafeValue converts it to a decimal, which gets read back out without the ".", overwriting the Text entered. This seems like a keyup vs onblur issue, which a lot of binding frameworks let you override. I know I could bind a string on the view model instead, but handling the EditingDidEnd instead of EditingChanged seems better. That way I could

MVVMCross Binding decimal to UITextField removes decimal point

。_饼干妹妹 提交于 2019-12-20 04:39:02
问题 Binding a decimal to a UITextField does not let you put a "." in, as you type "1.", the push to source strips it out. I get why it happens, MakeSafeValue converts it to a decimal, which gets read back out without the ".", overwriting the Text entered. This seems like a keyup vs onblur issue, which a lot of binding frameworks let you override. I know I could bind a string on the view model instead, but handling the EditingDidEnd instead of EditingChanged seems better. That way I could

MvvmCross Android Bind Image from byte[]

怎甘沉沦 提交于 2019-12-20 03:17:00
问题 Does anyone know how to bind a byte[] (image) to a Image control in a axml view. My ViewModel inherit from MvxViewModel. All my other bindings works great but I cannot find a way to bind that image. 回答1: I think you could bind this using a custom UI control. To do this, you'll need to do something like: inherit a new MyImageView from ImageView add the default constructor (which passes the context and attributes down to the base constructor) add a new RawImage property to MyImageView ,

How to create view's actions listener for MvxItemTemplate

岁酱吖の 提交于 2019-12-20 03:11:35
问题 I have a view which contains an MvxListView and a form. I can hide the softkeyboard using the following code in my view's code (as this is pure view concerns) var editText = FindViewById<EditText>(Resource.Id.newCheckbookName); editText.EditorAction += (object sender, TextView.EditorActionEventArgs e) => { if (e.ActionId == ImeAction.Done) { InputMethodManager inputMgr = GetSystemService(InputMethodService) as InputMethodManager; inputMgr.HideSoftInputFromWindow(CurrentFocus.WindowToken, 0);

ViewModel's constructor is being called again on navigation, and so messenger subscriptions are being subscribed again

穿精又带淫゛_ 提交于 2019-12-20 02:38:22
问题 I am building a cross-platform mobile application using MvvmCross framework. Since I would like to share information between ViewModels, I am registering notifications inside the ViewModel's constructor, using the built in MvxMessenger . Let's assume a message named ShowAdsMsg , and then the ViewModel looks as follows: public class AdsViewModel : BaseLookersViewModel, IAdsViewModel { private MvxSubscriptionToken _showAdsMsgToken; public AdsViewModel() { _showAdsMsgToken = MvxMessenger

Binding the Enabled property of a Android button with the MvvmCross

别说谁变了你拦得住时间么 提交于 2019-12-19 18:20:18
问题 I have a problem when I try to bind the "Enabled" property of my Android Button to a Boolean of my ViewModel using the MvvmCross framework and I really don't know the origin of it. So I have a ViewModel which contains the two following properties : private ProjectDetailDTO _projectDetail; public ProjectDetailDTO ProjectDetail { get { return this._projectDetail; } set { _projectDetail = value; RaisePropertyChanged(() => ProjectDetail); RaisePropertyChanged(() => HasPicture); } } private bool