mvvmcross

Odd issue with MvvmCross, MvxListViewItem on Android

[亡魂溺海] 提交于 2020-01-05 10:36:39
问题 Have come across an issue using MvvmCross on Android. I have a MvxListView that has been derived with a custom adapter so that I can show different views for various types of items. This works fine. The issue I am seeing is that occasionally I have the following problem. The MvxListViewItem is created and shown on screen but none of the bindings have taken place (I'm using DelayBind as shown in all of the examples but the Action isn't invoked). If i then scroll this item offscreen and back

Odd issue with MvvmCross, MvxListViewItem on Android

荒凉一梦 提交于 2020-01-05 10:34:28
问题 Have come across an issue using MvvmCross on Android. I have a MvxListView that has been derived with a custom adapter so that I can show different views for various types of items. This works fine. The issue I am seeing is that occasionally I have the following problem. The MvxListViewItem is created and shown on screen but none of the bindings have taken place (I'm using DelayBind as shown in all of the examples but the Action isn't invoked). If i then scroll this item offscreen and back

How to pass data back in when closing a view

一笑奈何 提交于 2020-01-05 04:55:18
问题 I have a ViewModel that has a command that opens another view: public ICommand OpenAnotherViewCommand { get { return new MvxCommand(() => ShowViewModel<AnotherViewModel>()); } } So far, so good. Then in AnotherViewModel I want to be able to go back to the first view model. Originally I did something like this: public ICommand ReturnCommand { get { Dictionary<string, string> parameters = new Dictionary<string, string>(); // Add some stuff from this model to pass to the first view model return

UIActivityIndicatorView.StartAnimating overriding UIActivityIndicatorView.Hidden binding

拈花ヽ惹草 提交于 2020-01-05 03:23:05
问题 I am creating a UIActivityIndicatorView in my Controller.ViewDidLoad UIActivityIndicatorView spinner = new UIActivityIndicatorView(); spinner.StartAnimating(); spinner.Hidden = true; this.Add(spinner); Then I am binding it with MVVMCross var set = this.CreateBindingSet<TipView, TipViewModel>(); set.Bind(spinner).For(v => v.Hidden).To(vm => vm.IsBusy).WithConversion("Inverse"); When the View initially loads the UIActivityIndicatorView is spinning and visible. This is incorrect as the IsBusy

How to properly use Fragments inside TabLayout with MvvmCross 6.x

无人久伴 提交于 2020-01-04 15:51:07
问题 Problem I'm trying to make a very simple Proof of Concept with TabLayout and Fragments using MvvmCross 6.1.2. For this, I implemented an activity with a TabLayout and a ViewPager, which should have two tabs - each one containing a different fragment with just one TextView. But I'm receiving an exception followed by a crash on runtime, when this activity should be displayed: The type MvxTabLayoutPresentationAttribute is not configured in the presenter dictionary Code This is what my code looks

Binding MVVMCrossCore - TableView NullReference exception

痴心易碎 提交于 2020-01-04 15:31:59
问题 Here the code for my ProductGroupTableViewcell, which must load from a NIB file: //The cell must load from nib file public partial class ProductGroupTableViewCell : MvxTableViewCell { public static readonly UINib Nib = UINib.FromName ("ProductGroupTableViewCell", NSBundle.MainBundle); public static readonly NSString Key = new NSString ("ProductGroupTableViewCell"); public ProductGroupTableViewCell (IntPtr handle) : base (handle) { this.DelayBind(() => { var set = this.CreateBindingSet

MvvmCross for WPF and Xamarin.Mac: is it possible?

让人想犯罪 __ 提交于 2020-01-04 06:14:20
问题 I'd like to ask anyone out there whether is possible, as of today, to develop a Windows/MacOS cross platform application using WPF (in Visual Studio) and Xamarin.Mac (in Xamarin Studio for Mac). I searched the web, twitted people (Stuart, I know you pointed me to loqu8 build some days ago, but I'm just stuck :P) but nothing really useful came up. So, my questions are: First and foremost: is it possible? Is it production ready? If not, how much stable it is? Are there any plans for improving

How to dynamically change image in MvvmCross

你说的曾经没有我的故事 提交于 2020-01-03 17:56:25
问题 I have both images in the resources folder 1) ImgMsg_Normal.png 2) ImgMsg_Grey.png in Layout file: <ImageView android:id="@+id/imgMsg" android:src="@drawable/ImgMsg_Normal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxHeight="80dp" android:maxWidth="80dp" android:layout_margin="20dp" android:scaleType="fitCenter" local:MvxBind =" " /> in code Behind: when this page is loaded, it first displays the said image : ImgMsg_Normal. 1) How to change the image

MvxTabsFragmentActivity - Remove tabs

久未见 提交于 2020-01-03 06:20:08
问题 Is there any way to remove tabs from an MvxTabsFragmentActivity-inherited class? I mean, currently there's only AddTab<T>() method for adding tabs. But, what if I want to remove tabs? TIA, Pap 回答1: No - MvxTabsFragmentActivity doesn't provide any RemoveTab functionality currently. The source for this activity is https://github.com/MvvmCross/MvvmCross/blob/v3.1/Cirrious/Cirrious.MvvmCross.Droid.Fragging/MvxTabsFragmentActivity.cs - you should be able to use this as a starting point for your

MvvmCross/Xamarin “This class is not key value coding-compliant for the key” [duplicate]

北慕城南 提交于 2020-01-02 19:20:15
问题 This question already has answers here : Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error? (68 answers) Closed 3 years ago . I know this question has been asked a million times but I'm getting the error trying to follow along with Stuart Lodge's tutorials "N+1 days of MvvmCross", N=11, CollectionView. I'm not following along 100% as I've got another project that I'm editing while watching the tutorials so I'm sure I've