mvvmcross

MvvmCross 3.0.14 - MvxListView selection not working in Android

拈花ヽ惹草 提交于 2019-12-11 03:46:33
问题 I have updated the MvvmCross library from 3.0.12 to 3.0.14 and the items selection stopped working for MvxListViews. I've created a simple example from the first demo application to display this. The project contains two solutions with the same code but different versions of the MvvmCross Library. 3.0.12 version works well (selected items keeps checked) 3.0.14 version breaks the behavior Do i have to change something in my code or is it a bug of the Framework? I am using API Level 12 for the

MvvmCross - MonoGame

若如初见. 提交于 2019-12-11 03:36:51
问题 I'm trying to build a MonoGame view inside MvvmCross on Android,iOS and WP8. On Windows side it's relatively easy to use dependency properties as a binding target, but how can I achieve a cross platform data binding solution that I can use on all platform? 回答1: This was covered in a previous MvvmCross version - see Insert a Monogame view inside MvvmCross monodroid Activity The technical details have changes a bit since that post, but the core of the advice remains the same - use inheritance

How to handle Back Button to remove current fragment In MvvmCross

試著忘記壹切 提交于 2019-12-11 03:28:59
问题 My MainMenu is the first launched activity or page which will show the MainPage as the Fragment in this MainMenu, a) it has a Left Drawer. When user click on an item in the drawer, it will be displayed as fragment. In this MainPage, b) it has dropdown menu in Action-Bar. when user click an item in the menu it will be displayed as fragment The Problem: 1) User click an item in MainPage(b) :Action_bar dropdown menu, how to remove or not to show this current display fragment WHEN user click the

How to create Tabs using Android Xamarin with MvvmCross MvxTabsFragmentActivity

给你一囗甜甜゛ 提交于 2019-12-11 03:12:53
问题 I'm trying to implement a tabs control of ViewPager inside the android project of a MVVMCross xamarin solution. The binding is working in the windows phone app so i assume the Viewmodel is working. I have an activity that inherits MvxTabsFragmentActivity that i want to add Tabs into. My app can not detect the id : Resource.Id.actualtabcontent. This is how i Attempted it, (https://github.com/Cheesebaron/Cheesebaron.MvvmCross.Bindings/blob/master/Bindings.Droid/BindableViewPager.cs) as well as

MvvmCross - How to bind UIView.Layer.AnyProperty (Xamarin.iOS) to a property on a viewmodel?

那年仲夏 提交于 2019-12-11 03:09:14
问题 I have a property on a view model called BorderColor of type string, and I try to bind it to UIView.Layer.BorderColor, here's the binding sytax: set.Bind (this.MyUIView).For ("Layer.BorderColor").To (t => t.BorderColor).WithConversion (new StringToColorConverter { ToCGColor = true }); It doesnt work, however, if I say bind to BackgroundColor property directly on a UIView, it works like a charm. Anybody knows if binding to Layer property is supported by MvvmCross? I tried different variations

Android view states: pressed, activated, selected etc. bindings. Do I have to write custom bindings?

拟墨画扇 提交于 2019-12-11 03:03:22
问题 Binding a boolean (HasLiked) to Pressed from viewmodel results in error: Failed to create target binding for from HasLiked to Pressed Does it mean that android View.Pressed (and other states) bindings by MvxBind aren't supported by default? Do i need to write custom bindings? EDIT- binding: <RelativeLayout style="@style/ButtonExtraSocial" android:background="@drawable/SelectorButtonExtra" app:MvxBind="Click LikeCommand; Pressed HasLiked"> .... </RelativeLayout> HasLiked boolean exist in

Return ImageView instance when i click on the item GridView

痞子三分冷 提交于 2019-12-11 02:14:52
问题 How to return ImageView instance when i click on the item GridView? I create custom bindings event for ItemClick: public class ItemClickSquareBinding : MvxBaseAndroidTargetBinding { private readonly GridView _gridView; private IMvxCommand _command; public ItemClickSquareBinding(GridView gridView) { _gridView = gridView; _gridView.ItemClick += GridView_ItemClick; } private void GridView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { //----->Get ImageView } public override void

How to use ViewModelCloser to close the View of the ViewModel?

天大地大妈咪最大 提交于 2019-12-11 02:14:22
问题 In the MvvmCross v3, CustomerManagement example, the method void RequestClose(IMvxViewModel viewModel) closes the top View . How do you close the View of a ViewModel instead? 回答1: I wouldn't use that ViewModelCloser method - although it could be extended if you want to. MvvmCross v3 removed the previous CloseViewModel method - because it didn't really work across all platforms and across all presentation styles - across all of navigation controllers, splitviews, tabs, flyouts, popups, dialogs

How can I assign Hex or RGB color to the MvxColor in Android Converter

主宰稳场 提交于 2019-12-11 01:59:33
问题 I have converter like below in that I want to return my own Hex or RGB color. In iOS public class PinkSelectedWhiteUnselectedValueConverter : MvxValueConverter<bool, UIColor> { UIColor purePink = UIColor.FromRGB(233, 60, 172); protected override UIColor Convert(bool value, Type targetType,object parameter, CultureInfo culture) { return (bool)value ? purePink : UIColor.White; } } it's working fine But in Android, it's not working public class PinkSelectedWhiteUnSelectedValueConverter :

WP7 MVVMCross Detect RequestClose or BackKeyPressed inside ViewModels

元气小坏坏 提交于 2019-12-11 01:58:36
问题 I have two view. I navigate from one to the other and in the other I call RequestClose or use the back keypress. How can I detect in the first ViewModel these events? Regards, Dan 回答1: By default the MvvmCross framework doesn't tell you about this event. You'll need to work out some other way of letting the ViewModel know that it needs to do something. How you do this depends on what the actual event is that you are looking for. For example: if the second ViewModel changed some data in an