Questions tagged [mvvmcross]
MvvmCross is an open source, convention over configuration, MVVM framework for the Xamarin platform and Windows UWP, WPF, Windows Phone 8.1 (non-Silverlight), Windows 8.1 (modern Apps) and Windows Console Apps.
3,701
questions
63votes
1answer
1kviews
MarkerClick works but InfoWindowClick does not open ViewModel
The following MarkerClick implementation works, perfectly fine. I could be able to open other Views via ShowViewModel
View.cs
mMap.MarkerClick += MMap_MarkerClick;
private void MMap_MarkerClick(...
40votes
22answers
22kviews
Android App Compile Not Generating Package Resources
When attempting to compile my Xamarin.Android app I get the compile error:
Error 3 The file "obj\Debug\android\bin\packaged_resources" does not exist. MyApp.UI.Droid
This error occurred after I ...
32votes
25answers
36kviews
The "ResolveLibraryProjectImports" task failed unexpectedly
I have a Xamarin project, which is based on MvvmCross. The project is for both iOS and Android. I opened this project in Visual Studio 15. I got some errors, which I solved in no time. There are some ...
28votes
4answers
11kviews
How can I use async in an mvvmcross view model?
I have a long running process in an mvvmcross viewmodel and wish to make it async (http://msdn.microsoft.com/en-us/library/vstudio/hh191443.aspx).
The async keyword is currently supported in the beta ...
26votes
4answers
8kviews
MVVMCross support for Xamarin.iOS Storyboards
With support for XS integration of iOS storyboards about to make the Stable stream, I would love to be able to use this feature in conjunction with MVVMCross.
Fundamentally it does seem a little like ...
22votes
3answers
47kviews
Change default timeout
I have the following implementation. And the default timeout is 100 seconds.
I wonder how can I able to change the default timeout?
HttpService.cs
public class HttpService : IHttpService
{
...
19votes
1answer
33kviews
Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead
I'm having this issue when I applied the toolbar into my app and it crashed when I try to run the app.I used all previous post but no luck.
Here is my code :
Style.xml
<style name="...
19votes
2answers
3kviews
Are there any pros to using PCL profile 158 over 78 for Xamarin and MvvmCross?
I am working on a cross-platform Xamarin app targeting iOS and Android, using Stuart Lodge's excellent MvvmCross framework.
Microsoft recently released new versions of their Portable Class Library ...
17votes
3answers
6kviews
ReactiveUI vs. MvvmCross
Title says it all. Based on your experience, what's the key difference between both frameworks?.
When we should use one over the other?.
Intended use: cross-platform development (Windows 8, iOS, ...
16votes
1answer
5kviews
Return id of resource, if i know name of resource
How i can return id of resource, if i know name of resource?
Something like this:
String mDrawableName = "myappicon";
int resID = getResources().getIdentifier(mDrawableName , "drawable", ...
16votes
10answers
13kviews
The "GenerateJavaStubs" task failed unexpectedly
I have created one new project in Visual studio and only che in .xml file (put two frame layouts) and when i debug the code i have one error, please told me the solution
Error 1 The "...
16votes
5answers
3kviews
Fast Deployment of App to Android Emulator Always Fails
I am attempting to Use Fast Deployment to quickly test my Android App in the emulator. I am doing this because, as you probably know, building and testing an app on the emulator is incredibly slow and ...
15votes
2answers
5kviews
Difference between Monocross & Monotouch (xamarin)?
i am right now exploring the capabilities of Monotouch (by Xamarin) with other solution such as
Monocross?
So can any one explain when to use Monotouch and when to Monocross.
What is the advantage &...
15votes
2answers
9kviews
Passing complex navigation parameters with MvvmCross ShowViewModel
My complex type wouldn't pass from Show to Init method even with configured MvxJsonNavigationSerializer as specified here Custom types in Navigation parameters in v3
public class A
{
public string ...
14votes
2answers
5kviews
Show view from non-view/viewmodel in mvvmcross
What is the correct way to open a View in mvvmcross from a non-view? From within a viewmodel we would use ShowViewModel<>(..).
Specifically we are responding to a push notification opening the app ...
14votes
1answer
9kviews
List of local:MvxBind binders
I couldn't find a list of all type of binders available for use, recently a collegue found about local:MvxBind="Visibility Property" and that helped a lot with our code. I belive that MvvMCross has a ...
13votes
2answers
5kviews
Fluent Bindings and UIButton titles
Since my user interfaces generally need to have localized strings, my view models provide all the strings which the views consume. This includes things like the titles on buttons.
on the iOS side, ...
13votes
4answers
14kviews
how to bind an image src to resource drawable image with Mvvmcross?
I'm trying to bind an image's src.
I have tried using MvxHttpImageView like this
<Mvx.MvxHttpImageView
android:layout_width="wrap_content"
android:layout_height="...
13votes
1answer
4kviews
MvvmCross binding to multiple properties on android control using swiss syntax
What is the correct syntax for binding to multiple properties on an Android element?
I tried something like this local:MvxBind="{ Value StartTime, Text StartTimeText}"
where properties StartTime and ...
13votes
2answers
8kviews
What is the best way to handle GoBack for the different MvvmCross (v3) platforms
In MvvmCross v3 I use ShowViewModel to navigate to different pages. Before converting over to Mvx I'd use the NavigationService.GoBack() method to go back to the previous page. The advantage being ...
13votes
1answer
7kviews
ViewModel LifeCycle, when does it get disposed?
In mvvmcross v3 ViewModel
public class TimerViewModel : MvxViewModel
{
System.Timers.Timer timer;
public TimerViewModel()
{
timer = new System.Timers.Timer(500f);
timer....
12votes
1answer
4kviews
What is the best way to pass objects to "navigated to" viewmodel in MVVMCross?
I've a ViewModel which contains a Team which has a Players property which is a list of Player objects. Within TeamView the Team is deep loaded, so player data is already in the memory.
What is the ...
12votes
2answers
12kviews
Using MvxCommand With CommandParameter binding
I'm trying using fire MvxCommand with CommandParameter, but faced with following problem:
MyView.axml contains:
<LinearLayout
android:orientation="horizontal"
android:layout_width="...
11votes
1answer
6kviews
Instantiation of ViewModels and Service classes
I tried to understand the instantiation of ViewModels and Service classes and wrote it down for others. Please correct/add-on where needed.
The instantiation of ViewModels and Services is not done in ...
11votes
2answers
6kviews
Xamarin MvvmCross ViewModel Validation
I'm building my first Xamarin MvvmCross application at the moment and I'm currently looking at validating user input to the view models.
Doing a lot of searching around everything (including the ...
11votes
4answers
3kviews
MVVMCross Code Snippets for Visual Studio?
where can I download the snippets for Visual Studio, the likes pf pmvx, cmvx and others?
I though those would be available on the github projects, but can't find them...
11votes
5answers
10kviews
Alert Dialog in ViewModel - MVVMCross
In the ViewModel, I have Save method where I check isValid property.
If isValid is false, then I want to display an error message.
Since AlertDialog is platform specific, I wonder how do you handle ...
11votes
3answers
4kviews
Using AutoLayout to stack within two Columns of varying Heights
Targetting iOS 8.1
I am using AutoLayout to lay out a number of Labels in a TableCell. Some of those Labels are optional and some can wrap their Text. They are split across two "Columns", these ...
11votes
1answer
956views
Programmatically creating and binding Android Spinners in MvvmCross
I am building a cross-platform application that requires dynamically generating and binding Spinner controls. I was able to do that on iOS and Windows platforms, but have issues with Android. If I ...
10votes
7answers
17kviews
Cannot launch Xamarin.iOS app on device
I am developing an iPad application with Xamarin.iOS and MVVMcross. So I have a PCL with my View-Model and my Model, and an iOS project with the view. I use Visual Studio.
Before, I used Xamarin.iOS ...
10votes
2answers
6kviews
Nuget: no compatible package found in active solution for MvvmCross.CrossCore
I am trying to install MvvmCross.HotTuna.CrossCore 3.0.14 into a WindowsPhone 8.0 class library from the NuGet command line. Error I get when attempting to do this is:
PM> install-package ...
10votes
1answer
1kviews
AOT issue with mvvmcross
I'm unable to build Xamarin projects that reference MvvmCross as I receive the error:
Error MT3001: Could not AOT the assembly '/Users/chriskoiak/Documents/Initial/Mobile Clients/xxxx/obj/iPhone/...
10votes
1answer
5kviews
MvvMCross Binding with format string
How can i add a format for a binding, that formats the bound value with string.Format or something similar? I saw in other threads, that you can pass a converterName.
Does a converter for this issue ...
10votes
1answer
8kviews
MvxListView create binding for template layout from code
Lets say I have a simple Layout with a MvxListView:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://...
10votes
2answers
7kviews
How to use CanExecute with Mvvmcross
I have a Button
<Button
android:id="@+id/ButtonConnect"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Disconnect"
local:...
10votes
2answers
3kviews
PCL .NET 4.5 Timer
I am building cross platform apps with Xamarin and MvvmCross. I need to call the server to the updates every minute (I will move to push notifications later) but I am unable to make a timer in my Core ...
10votes
3answers
4kviews
Outline color of the Frame is not displayed in Xamarin Forms Android Project using MvvmCross
Currently I am working on a Xamarin Forms Android project using MvvmCross. I have a strange problem regarding the Frame. Whenever I set the OutlineColor, it is displayed only in iOS and not in Android....
9votes
3answers
12kviews
MvvmCross Dialog
I am currently investigating all possible solutions to be able to inform the user, ie pop a dialog, when there is a decision he needs to make. This is a common problem with MVVM pattern and I am ...
9votes
2answers
5kviews
Getting PCL, Mvvmcross, Nuget and Xamarin Studio to play "nice" on Mac
Looking at the MvvmCross.PortableSupport.3.0.1.nuspec
I noticed the there is the following line:
<file src="_._" target="lib\portable-win+net45+MonoAndroid16+MonoTouch40+sl40+wp71\_._" />.
I ...
9votes
1answer
2kviews
Mvvmcross(iOS) binding the Title of UIViewController
Is it possible to bind the Title of a UIViewController to a ViewModel string property? It never seems to update. As a side issue, if you haven't set the title to something before the bind then there's ...
9votes
3answers
8kviews
Check whether Internet is on or off in Xamarin Android
I am working on Xamarin Android Application.Before proceed to my next fragment I want to check Internet Connection and inform user about it ? How can i implement that ?And how to refresh whole ...
9votes
1answer
7kviews
MVVMCross iOS: How to trigger RowSelected on a Custom TableViewSource using CreateBindingSet?
My question is for MVVMCross in iOS. I have a custom TableView and a detailView. How can I bind my "showDetailCommand", so when user click on one of the rows on TableView with trigger RowSelected to ...
9votes
6answers
4kviews
MvvMCross 3.0.6 Nuget package installation issue
I am trying to install MVVMCross NuGet package using NuGet 2.5 version. I have added the mono android and touch file to Profile104 folder. Still I am getting following exception:
Attempting to ...
9votes
1answer
10kviews
Passing on variables from ViewModel to another View (MVVMCross)
For the past couple of weeks I've been working on developing a cross platform app (IOS/Android/WP7) using the MVVMCross framework. Today I ran into a problem I don't really know how to solve, so ...
9votes
3answers
5kviews
setup of xamarin studio to work with PCL & MVVMCross
I really enjoy Xamarin Studio and I'm looking for a template solution to start developing a cross devices application with MvvmCross.
But I can't find how to set a project to work with PCL and ...
9votes
2answers
4kviews
mvvmcross expandablelistview
I was just wondering if the functionality of or similar to ExpandableListViews was lurking within the Mvvmmcross framework or is this type of control not applicable with multi platform requirements.
...
9votes
2answers
3kviews
How do you run a batch of SQL statements using the SQLite.NET PCL
In the past I have avoided ORM and always handcrafted parameterised queries etc. This is very time consuming and a real pain when first developing an application. Recently I decided to have another ...
9votes
3answers
2kviews
App Crashes when debugging on device
My application debugs fine on the iOS simulator, and it runs fine when I build and deploy an ipa file to the device. However, if I try to debug on the device (iPhone 9.3.1 and iPad 9.3), the app ...
9votes
1answer
283views
I have two cells with different heights. When I remove the first one, the second one gets the height of the first one
Some context
In this screen you can add and remove people. Not all fields are required, so the cell height is dynamic.
The problem
If I add first a person with all the fields completed, then a ...
8votes
6answers
4kviews
Attributes from MvxBindingAttributes are not added with MvvmCross
I have the MvxBindingAttributes.xml in my UI.Droid/Resources/Values but everytime I try to use the bindings in my layouts I get
Warning attribute is not declared.
No resource identifier ...