mvvmcross

Create View Model using MVVMCross built in factory?

天大地大妈咪最大 提交于 2019-12-13 12:15:52
问题 I have a situation where I want to "resolve" view models without having to manually call out to the IoC container to resolve a viewmodels dependencies. I'm assuming that internally Mvvmcross has a viewmodel factory used to create viewmodels while injecting their dependencies. Can I call into that directly? If so, what is it called and what namespaces do these factories reside in? Essentially what I'm trying to do is create a "HomeViewModel" for a tabcontroller but don't want to hardcode the

Hosting and initialising multiple MVVMCross ViewModels for the MvxTabViewController

本秂侑毒 提交于 2019-12-13 07:43:19
问题 I need to create a Tab view in iOS. I tried to do this by simply adding a UITabBar to an MvxViewController but I could not get that to work (See this question if interested) I am now trying to go use the approach MVVMCross and Apple seem to push me towards, a TabController. In our Core project we have 4 ViewModels that are displayed from one or more places using a ShowViewModel call and are initialised with a customerNumber. CustomerViewModel CustomerOrdersViewModel CustomerHistoryViewModel

MvvmCross.Platform.Exceptions.MvxException bindingContext is null during MvxAdapter creation

梦想的初衷 提交于 2019-12-13 07:23:58
问题 I tried to convert MVXActivity into MvxFragment , the application crashes when i try to inflate the layout bindingContext is null during MvxAdapter creation - Adapter's should only be created when a specific binding context has been placed on the stack public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreate(savedInstanceState); return inflater.Inflate(Resource.Layout.BrandView1, container, false); } and my layout looks like

Operation not permitted on IsolatedStorageFileStream. when using MvvmCross file plugin

别来无恙 提交于 2019-12-13 04:57:05
问题 I have an instance of IMvxFileStore implementation for for Windows Phone injected into my service. Let say I want to store settings in a file located at appsettings\userprofiles\profile1.txt Using the file plugin, I first call the API EnsureFolder exists, passing in the full path to my profile settings file appsettings\userprofiles\profile1.txt to ensure that this folder has been created and does exist. Just for sanity, I check to ensure that the folder has been created using the FolderExist

How do you initialize theMvvmCross SQLite plugin

那年仲夏 提交于 2019-12-13 04:47:24
问题 I am creating a MvvmCross application that requires a DB. I have been following the N+1 KittenDB example. I no not understand how the initializer for the DataStore ever gets called. I have noted the initializer for the FirstViewModel has it as a parameter. I run my code and I get Unhandled Exception: Cirrious.CrossCore.Exceptions.MvxException: Failed to construct and initialise ViewModel for type VrWizard.Core.FirstViewModel My Initializer is private IRepository _repository; public

Error Inflating Mvx.MvxImageView

℡╲_俬逩灬. 提交于 2019-12-13 04:32:50
问题 I am having a problem with inflating MvxImageView inside a custom control. from the research I did I found several suspects Should I add if so to what? (i saw this in regards to the android map view inflate error. Am I creating the User control all wrong? I saw a recommendation to use SetContentView() instead of inflate because it passes the indlate request through the mvvmcross mechanisem but there is no such method in a custom view. Here is the custom control layout: <?xml version="1.0"

mvvmcross MvxActionBasedTableViewSource as groupped table

六月ゝ 毕业季﹏ 提交于 2019-12-13 04:32:10
问题 I use MvxActionBasedTableViewSource for my custom binding on common grids. Func CellCreator is really great and everything works fine with that. But. What way is it expected to deal with groupped tables ? I need some dynamic binding with them. So, does that mean that I should implement that logic by my own and CellCreator can not be used for such behaviour anyhow? Thanks! 回答1: MvxActionBasedTableViewSource is designed for simple tables only - so cannot be used for grouping without some

How to pass data across screens using mvvmcross

这一生的挚爱 提交于 2019-12-13 04:24:11
问题 I have an mvvmcross xamarin project I am trying to figure out the best way I should approach sending data across screens for a particular situation. My first screen is a search filter, it contains all kinds of criteria for the users to select for filtering results. The second screen is the results list screen. I've seen numerous options for approaching this problem: 1) Use the Init method - The issue I'm having here is that when I pass custom objects, the values are always null/default. If I

MVVM Cross Resolve IMvxTouchViewCreator fails iOS 8

旧时模样 提交于 2019-12-13 03:59:00
问题 Calling Mvx.Resolve does not work for me when I deploy to iOS 8 (device or simulator) but works fine when I deploy to iOS 7.1 (device or simulator). I receive the following error: "Cirrious.CrossCore.Exceptions.MvxIoCResolveException: Failed to resolve type Cirrious.MvvmCross.Touch.Views.IMvxTouchViewCreator" I tried running the TwitterSearch example (because it also resolves IMvxTouchViewCreator) and it has no trouble in iOS 8. For iOS 7.1 this call resolves to the class

Issue with Checkbox's and API 23

只愿长相守 提交于 2019-12-13 03:11:20
问题 I've a problem with the status of the AppCompatCheckBox and the colors it shows in the box and the api 23 after I update the target platforms to android 9.0 API 28. If I initialize my checkbox in true, it shows the check correctly checkbox initial But, if I uncheck the box it shows the blank box with the edges of my primary color check It should be gray border, white background. And when you check, this appears bad unchecked It should be boder and background blue. I build the checkboxes