mvvmcross

The name “AppClass” does not exist in the namespace “…” when inheriting UWP Application class from another Application-based class

ぃ、小莉子 提交于 2019-12-24 01:45:17
问题 What I want to achieve is just to inherit UWP App class not from Windows.UI.Xaml.Application class, but from some base class, inherited from the "standard" one. However, when I do it: namespace MyNamespace { sealed partial class App : MyUwpBaseApplication { public App() { this.InitializeComponent(); } } } and xaml: <local:MyUwpBaseApplication x:Class="MyNamespace.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns

Animate selected item in MvxRecyclerView

自古美人都是妖i 提交于 2019-12-24 01:15:19
问题 I am using MvxRecyclerView and I want to animate the selected item in the list. How can I get a reference to the selected item view? Should I use TouchDelegate? 回答1: You should be able to get the view reference through the RecyclerAdapter . Implementation Example: Create a custom MvxRecyclerAdapter to deal with your desired animation. public class SelectedAnimatorRecyclerAdapter : MvxRecyclerAdapter { public SelectedAnimatorRecyclerAdapter(IMvxAndroidBindingContext bindingContext) : base

MvvmCross Android - Alternative to RelativeSource binding for button command

♀尐吖头ヾ 提交于 2019-12-24 00:37:40
问题 I have a list of items bound to a MvxBindableListView with a MvxItemTemplate. I usually have 4 items in my list bound to my view. Data gets updated and the view displays the new data just fine . Now, I want to add two buttons to this item template. However, relative source binding is not available with MvvmCross. (see image) But I'm having difficulties working out a solution to this. I have tried the ItemClick binding of the list item, but that only gives me 1 possibility of click and I need

How do I bind multiple properties in an Android layout element

こ雲淡風輕ζ 提交于 2019-12-24 00:14:35
问题 I'm using MvvmCross to databind my ViewModel to an Android View layout. From the SimpleBinding example I can see that to bind a value to a property I do this: <EditText android:hint="Subtotal" android:gravity="left" android:inputType="numberDecimal" android:maxLines="1" android:numeric="decimal" local:MvxBind="{'Text':{'Path':'SubTotal','Converter':'Float'}}" /> so Text is bound to the SubTotal property of the ViewModel. But how do I bind to more than one property? In my case I want to bind a

MvvmCross 4 and WPF SQLite plugin

放肆的年华 提交于 2019-12-23 17:21:40
问题 In MvvmCross 4.0.0 the Community SQLite plugin has been replaced with new SQLite-PCL plugin (if I am not mistaken). It works great in my Android application, but when I tried to use it in WPF application I faced problems. When package is installed from nuget there's no default Bootstrap file, therefore Mvx runtime fails to resolve classes like MvxSqliteConnectionFactory . When I add bootstrap code manually I get error like: A first chance exception of type Cirrious.CrossCore.Exceptions

MvvmCross Android Linking Issue on Visibility Converter

白昼怎懂夜的黑 提交于 2019-12-23 15:24:21
问题 I know there are linking issues with Android and I know about using the LinkerPleaseInclude. However I am not sure what to put into the LinkerPleaseInclude.cs file for the problem I am seeing. I have a view which uses the Visibility converter to use a boolean IsBusy property to determine whether a number of controls should be displayed or not . I am using a ProgressBar, a TextView and an ImageView. I have tried a number of combinations to get the linker issue fixed. When deployed as debug it

xamarin support in Add Portable Class Library dialog

爱⌒轻易说出口 提交于 2019-12-23 12:24:07
问题 What are the steps required to make the two items available in the Add Portable Class Library dialog? 回答1: Please see my answer in Creating a PCL that targets Monodroid In the meantime, there are quite a few blog posts around on how to get PCLs working unofficially - eg.: http://blogs.endjin.com/2013/05/xamarin-platform-setup-gotchas/ http://slodge.blogspot.co.uk/2013/04/my-current-pcl-setup-in-visual-studio.html 来源: https://stackoverflow.com/questions/16678066/xamarin-support-in-add-portable

ViewModel is null during ViewDidLoad

↘锁芯ラ 提交于 2019-12-23 11:02:10
问题 I am getting started with MvvmCross in iOS. public class MainView : MvxTabBarViewController { public override void ViewDidLoad() { base.ViewDidLoad(); var vm = (MainViewModel)this.ViewModel; if (vm == null) return; } } Setting a breakpoint to the line where access the ViewModel , shows me, that ViewModel is null. I can workaround this by calling ViewDidLoad() in the constructor. Then, ViewModel is null during the constructor call, but valid in the default ViewDidLoad call. But that looks like

TextInputEditText: ArgumentNullException: missing source event info in MvxWeakEventSubscription

梦想与她 提交于 2019-12-23 09:30:25
问题 All of a sudden the binding for my TextInputEditText started failing, and it has something to do with the Linker. If I set the linker to "None", everything works as intended. Alot of other bindings im using still works just fine. Stack im getting: Exception thrown during the view binding ArgumentNullException: missing source event info in MvxWeakEventSubscription Parameter name: sourceEventInfo at MvvmCross.Platform.WeakSubscription.MvxWeakEventSubscription 2[TSource,TEventArgs]..ctor

Xamarin: How to load image from iOS library project

删除回忆录丶 提交于 2019-12-23 08:57:09
问题 I have a Xamarin Project styled with MvvmCross. There are Subprojects: Core (PCL) ViewModel (PCL) iOS (Executable) If i add an image to my iOS project (Resoureces/Images/test_image.png), then i can load it with this code: UIImage image = UIImage.FromBundle("Images/test_icon.png"); Now, i want to use a new Subproject Controls (iOS Library) This library should load an image. I added an image to Controls (Resoureces/Images/test_image.png) But i can not load this image in Controls proj. My