Menu
  • HOME
  • TAGS

MVVMCross iOS reselect table row after table refresh

ios,monotouch,mvvmcross

So I got this to work by publishing a new message. I wonder if there is a cleaner way to do this but this works for me. When I complete my refresh in my ViewModel I do a: InvokeOnMainThread(async () => { await Task.Delay(250, cancellationToken); ItemSelectedCommand.Execute(newSelected); messenger.Publish(new DoneUpdatingInspectionsMessage(this)); }); Then...

Why “removing any who's ViewModel PropertyType is an interface” when creating the MvvMCross View lookup table

xamarin,viewmodel,mvvmcross,lookup-tables

When we were looking at this area of Mvx back in 2013 we didn't really find any users who wanted to hide each ViewModel behind interfaces, and we really didn't come across users who wanted to navigate using interfaces. Instead users generally wanted: to navigate directly to real ViewModel types...

Custom Controls in Xamarin iOS with MVVMCross and no XIB

monotouch,xamarin,mvvmcross

As Stuart said in his comment, N=32 - ViewModels and MvxView on the iPad - N+1 days of MvvmCross is the MVVMCross tutorial you want. For those that are happy with the idea of ViewModels being more than just a ViewModel per screen and understand Binding the bit around Custom...

MvvmCross Binding your DataModel to your ViewModel

c#,android,wcf,mvvm,mvvmcross

@Stuart had an excellent suggestion. Here is what I did. Here is my ViewModel: public class InventoryViewModel : MvxViewModel { public async void Init(Guid ID) { await MPS_Mobile_Driver.Droid.DataModel.ShipmentDataSource.GetShipmentInventory(ID); ShipmentInventory = ShipmentDataSource.CurrInventory; Shipment = await MPS_Mobile_Driver.Droid.DataModel.ShipmentDataSource.GetShipment((int)ShipmentInventory.idno, (short)ShipmentInventory.idsub); } private Shipment _Shipment; public Shipment Shipment { get { return _Shipment; } set...

Mvvmcross ListView SelectedItem setter not reached

listview,xamarin,mvvmcross,selecteditem,unselect

You didn't include your viewmodel's code but I belive you execute your navigation logic in setter of your SelectedProductSearchResult property. That's not the standard approach and you should rather use Command. First implement Command property in your viewmodel: public ICommand NavigateToDetailCommand { get { return new MvxCommand<WHM_PRODUCT>(item => { //Perform...

VS 2015 + universal app + mvvmcross 3.5.0 + sqlite

mvvmcross

So, to solve this i just have to download from http://www.sqlite.org/download.html and add reference manually Thanks to mohibsheth on jabbr room...

Hosting and initialising multiple MVVMCross ViewModels for the MvxTabViewController

monotouch,mvvmcross

I have the initialisation of the VMs working now too. When the View loads it checks if it is within a Tabbed UI by looking at the ParentViewController. If it is it calls a custom method on the new TabbedCustomerViewModel. I have copied the code that MVVMCross use and added...

How to detect when MvxListView is bound and has loaded its bindings?

xamarin,mvvmcross

Found a good solution myself; To track Itemsource changes in Android in a ListView you can use a DataSetObserver. like: internal class MyObserver : DataSetObserver { private readonly object view; public MvxListViewNonScrollableObserver(ViewToTrack view) { tView = view; DoSomething(): } public override void OnChanged() { base.OnChanged(); DoSomething(): } } Add it...

Implementing cell reuse for varying height cells in UITableView (iOS8+)

monotouch,mvvmcross

I broke my two issues into two questions however there is a solution for both this one and the other issue with this SO answer, UILabel not wrapping in UITableView until device rotate (iOS8)

Errors on MvxBind and MvxItemTemplate with a custom control that inherits from MvxListView

android,mvvmcross

Found a working solution on: http://blog.masterdevs.com/headers-and-footers-on-an-mvxlistview/ MVVMCross was discussing a simular issue on: https://github.com/MvvmCross/MvvmCross/issues/602 ...

iOS Project Fails to Compile

monotouch,xamarin,mvvmcross

The bug is in the method: public void Include(UIDatePicker date) in LinkerPleaseInclude class. Trying to pass DateTime as NSDate. Just comment out or remove following code : public void Include(UIDatePicker date) { date.Date = date.Date.AddSeconds(1); date.ValueChanged += (sender, args) => { date.Date=NSDate.DistantFuture; }; } Also can be resolved by updating...

What's the proper way to implement Fragments in MvvmCross 3.5.1

android,android-fragments,xamarin,monodroid,mvvmcross

Xamarin.Android 5.1 introduces some breaking changes. This means you need to add [Register("app.namespace.FragmentName")] in all your Fragments. For more information see: https://github.com/MvvmCross/MvvmCross/issues/987 http://forums.xamarin.com/discussion/37277/stable-release-xamarin-android-5-1-0-breaking-changes-new-features-and-bug-fixes EDIT: OK! This is not related to #990. The problem is that for some reason the MvxFragment cannot be inflated as it is not recognized as a...

MvvmCross - Wpf CustomPresenter

wpf,mvvmcross

I was able to find the problem in my code. I'm gonna post here the answer in case someone has the same problem. When i was registering the IMvxWpfViewsContainer, i was just registering it. Instead i had to Register it as a singleton. So the solution is to modify the...

How to bind MvxTableViewSource to dynamically created ViewModel with MvvmCross and Xamarin.iOS

ios,mvvm,data-binding,xamarin,mvvmcross

On the View side, Mvx bindings work for the IMvxBindingContextOwner rather that directly to the ViewModel - this allows them to update when the entire ViewModel is changed. So, to do what you want to do, you'll need to provide an IMvxBindingContextOwner which holds your dynamic view model within its...

How can my app fully occupy the entire window after hiding the Navigation Bar & the Status Bar?

c#,android,mvvmcross

I think what you trying to archieve its the immersive full-screen mode, in this link you could read more about this feature.

MvvmCross - MvxBind:Warning Failed to create target binding for binding Hello for -empty-

c#,android,xamarin,monodroid,mvvmcross

Turns out one of my binding declarations was incorrect: HomeView.axml <TextView ... local:MvxBind="Hello" /> Should be: <TextView ... local:MvxBind="Text Hello" /> The type Text was missing....

Conditional Binding of Properties using MVVMCross

c#,ios,xamarin,monotouch,mvvmcross

Typically, Mvvm developers do this type of formatting in a ValueConverter For more on this, see https://github.com/MvvmCross/MvvmCross/wiki/Value-Converters This includes the "time ago" sample which shows how to change the string depending on current value: public class MyTimeAgoValueConverter : MvxValueConverter<DateTime, string> { protected override string Convert(DateTime value, Type targetType, object parameter,...

How to prevent SupportV4 (Fragment)Tabhost creating its own Fragment at TabChange?

android,android-fragments,xamarin,mvvmcross

The answer would be the work-around; (but a better solution would be the suggestion of Cheesebaron) public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (ViewModel == null) { return null; } base.OnCreateView(inflater, container, savedInstanceState); return this.BindingInflate(Resource.Layout.GroupedFragmentView, null); } ...

What is the best async loading (view)models strategy when using MVVMCross

xamarin,mvvmcross

just to clearify; The ViewModels in MVVMCross (MvxViewModel) do have some handy override methods. Init for picking up navigation parameters Start to do everything else after the ViewModel is innitualized. To load ViewModel data in a more UX friendly way I was happy with the following in my ViewModels public...

MvxAdapter Programmatic Binding

xamarin,mvvmcross

For future reference, this is how I tackled binding within the adapter: The convertView is an IMvxBindingContextOwner, as set in the base.GetBindableView(). If convertView is cast to this, the binding methods, such as CreateBinding are available. You can then create a binding for any view within ConvertView, but I also...

linq query 'orderby' using multiple fields at SQLite plugin by MvvmCross doesn't work

linq,sqlite,xamarin,sql-order-by,mvvmcross

I was able to handle this by specifying mutiple OrderBy methods: var res = _db.Table<Contact>() .Where(c=> c.....) .OrderBy(c => c.Priority) .OrderBy(c => c.FirstName) .OrderBy(c => c.LastName) .Select(c=> c) .ToList(); Translated to the SQLite query: SELECT * FROM "Contact" WHERE ... ORDER BY "Priority", "FirstName", "LastName" Hope this helped...

Getting a switch Checked event to fire in the same way as a Click event with mvvmcross

c#,xamarin,monodroid,mvvmcross

Simplest answers: I think that Checked is a binding for a boolean property - so you can bind Checked on your view to a boolean on your ViewModel (and then handle some logic in the set handler if you need to). Alternatively, if you want a simple no-parameter Command binding,...

Prevent View from entering the history stack

ios,xamarin,mvvmcross

As said by suart; Gshackles has some great blog posts about the presenters in MvvmCross. One of them is: http://www.gregshackles.com/presenters-in-mvvmcross-manipulating-the-back-stack/ The line of code that you could use is: MasterNavigationController.PopToViewController(existingViewController, true); Or if you just want to go back to the first (aka root): http://gregshackles.com/presenters-in-mvvmcross-using-presentation-values/ MasterNavigationController.PopToRootViewController(false); ...

Creating dialog element inside tableViewController

xamarin,mvvmcross,mvxbind

This doesn't sound like it's a straight-forward thing to do. Monotouch.Dialog is an impressively complex beast and it relies on a few properties and methods in the owning DialogViewController. It's probably easier to tackle your current problem by recoding your table as a Dialog and then adding custom cells to...

MvvmCross IMvxValueConverter fires every time you type a key

c#,android,xamarin,mvvmcross

To solve this, you could add a binding for FocusText which would only update on losing focus. There was discussion recently about introducing FocusText within MvvmCross - based on MvvmCross: change update source trigger property of binding on MonoDroid - but I don't believe that ever made it through to...

MvvmCross android binding to fragment

xamarin,monodroid,mvvmcross

So how you can do this: create custom control with properties you need create target bindings place custom control into layout instead of your fragment bind from layout ...

MvvmCross Popup Window

c#,xamarin,monodroid,mvvmcross

there is a Xamarin Component available. Is this something that fits your need? http://components.xamarin.com/view/signature-pad Regards, Benjamin...

How to get Click event on MvxLinearLayout items\childeren?

xamarin,mvvmcross

The solution was to create a custom adapter for the MvxLinearLayout that inherited from MvxAdapterWithChangedEvent. Then overide the GetBindableView() and attach click event to all incomming items. To regulate the events you can hookup to DataSetChanged event, when items get removed or added on the fly. ...

MvvmCross on Xamarin.Mac

osx,xamarin,mvvmcross,xamarin.mac

Today, the state of the mac support in MvvmCross remains the same as before - as in MvvmCross for WPF and Xamarin.Mac: is it possible? Yes, a few developers do successfully use it in MonoMac/Xamarin.Mac - but the project itself builds and releases binaries from Windows where there is no...

MvvmCross binding + Android EventHandler

android,xamarin,mvvmcross

I suspect this is caused by both the MvvmCross binding and the internal Xamarin event handling both using SeekbarListener's - while Java only allows one of them to work at a time. In MvvmCross's case, this listener is at https://github.com/MvvmCross/MvvmCross/blob/3.5/Cirrious/Cirrious.MvvmCross.Binding.Droid/Target/MvxSeekBarProgressTargetBinging.cs#L41 One way around this for your case is: you could...

Binding to DataModel in MVVMCross

xamarin,monodroid,mvvmcross

The default mode is by naming convention. If your view is called "AwesomeView", Mvx will assign "AwesomeViewModel" to it at the app initialization. When your view is instantiated, Mvx will "inject" the dependency (ViewModel) into your view as a binding context So the convention to look up the view model...

Multiple Activities in Android using MVVMCross?

android,xamarin,mvvmcross

You should add a AppStart.cs to your core project and add this function: public async void Start(object hint = null) { if (CheckSomething == true) ShowViewModel<ViewModels.FirstViewModel>(); else ShowViewModel<ViewModels.SecondViewModel>(); } Then in your App.cs do: public override void Initialize() { RegisterAppStart(new AppStart()); } ...

UIAlertView popup won't let me swipe up Control Center

ios,xamarin,mvvmcross

It's not possible to get around this, since UIAlertView is probably being displayed above the window that handles gestures for the Control Center. This is the way Apple made it. I would use a custom view as a UIAlertView and fade the background view's alpha. Or you could use a...

No resource identifier found for attribute 'MvxBind' in package 'AndroidApp.Droid'

android,xamarin,mvvmcross

Some hows, some reference are not getting properly, please clean and build your project and the if still getting problems then check your package name also. I hope that is useful for you.

AttributedText on MvxTableViewCell

c#,ios,uitableview,monotouch,mvvmcross

You could use a converter something along this: public class UnderlineTextValueConverter : MvxValueConverter<string, NSAttributedString> { protected override NSAttributedString Convert(string value, Type targetType, object parameter, CultureInfo cultureInfo) { var attrs = new UIStringAttributes { UnderlineStyle = NSUnderlineStyle.Single }; return new NSAttributedString(value, attrs); } } and then update your binding to this......

Can't update hot tuna ios dialog support to version 3.5

monotouch,xamarin,mvvmcross,monotouch.dialog

The issue is you are still targeting the old 32 bit only iOS api (the MonoTouch.dll). All apps being written for the store must support 64 bit and 32 bit (Xamarin.ios.dll). You can I believe get a build of mvvmcross 3.5 that will support the old apis, but I'd look...

Unable to bind custom MvvmCross Views

android,visual-studio,xamarin,mvvmcross

As Stuart suggested, this is a part of Xamarin's breaking changes in Xamarin 5.1. I had to do two things to fix this: I had to add [Register("com/example/namespace/CustomViewName")] to my custom Views to fix those. I updated to MvvmCross 3.5.1 to fix binding for MvvmCross controls (e.g. MvxListView). ...

Failure in locating ValueCombiner in MvvmCross Android project

data-binding,mono,xamarin,monodroid,mvvmcross

Because value combiners are much less frequently used than value converters, mvx doesn't search for them in app assemblies by default. The good news is that it's relatively easy yo search for them yourself - or to register them manually. To do this, look for the value converters callback in...

HttpClient - Xamarin Android - MvvmCross

android,xamarin,monodroid,mvvmcross,dotnet-httpclient

Unfortunately, you haven't provided more information about what you are trying to do, but I can confirm that we are seeing similar buggy behavior in our Xamarin.Android Apps. The Mono Network Stack on Android has at least two problems (as of Feb 2015) that we are experiencing, so you are...

Integrating xamarin, CouchBaseLite, MVVMCross and SyncGateway such that View changes with database

xamarin,monodroid,mvvmcross,couchbase-lite,couchbase-sync-gateway

I would perhaps just use the CouchBaseLite Xamarin Component. If you are wanting to access this in your PCL Core project you will probably have to create some sort of wrapper around the component and inject it properly into each platform. You can use the MvvmCross plugins wiki to get...

Positioning a dialog window in WPF

c#,wpf,mvvm,mvvmcross

You should have a method / command, as such: public static void ShowMyWindow(WindowAbsoluteLocationPosition pos) { IShowMyWindowService myService = Mvx.Resolve<IShowMyWindowService>(); myService.ShowWindow(pos); } If that is done, you should use CommandParameter with Converter: <Button Command="{Binding YourCommand}" CommandParameter="{Binding ElementName=YourWindow, Converter={StaticResource yourConverter}}" /> which basically can turn YourWindow into the correct WindowAbsoluteLocationPosition (user-defined) structure...

MVVMCross WPF Value Converter with Tibet Binding Is Not Converting?

wpf,xaml,mvvm,mvvmcross,valueconverter

The debug output was telling me that it failed to find combiner or converter for BoolNegation. I noticed in the source code for MvxWpfSetup that it does not contain either protected virtual void RegisterBindingBuilderCallbacks() nor protected virtual void FillValueConverters(IMvxValueConverterRegistry registry) Like the MvxAndroidSetup class does, so neither of these methods...

Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead

android,mvvmcross,toolbar

Your theme should look like this, and remove @style/: <style name="MyMaterialTheme" parent="Theme.AppCompat.NoActionBar"> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> ... </style> Then, do not define the theme in <application/> tag. Define it only with activity you want to use the material design theme, i.e. in <activity> tag. If your activity extends PreferenceActivity, AppCompatActivity,...

Use PropertyChanged or WeakSubscribe?

xamarin,mvvmcross

In general, you won't hit problems if you use PropertyChanged strong subscriptions.... However, there are some cases where this can lead to "leaks" - e.g. if you subscribe on a sub-object which has a longer lifetime than a "normal" ViewModel (e.g. a singleton service). To be safe, though, you can...

MvvmCross SQLite composite key

sqlite,xamarin,mvvmcross

I believe it is supported if you download the latest source and compile. The NuGet package for the newest version hasn't been released yet. Be aware that you need at least version 3.5 of MvvmCross....

External image not displaying in UITableViewCellStyle with MVVMCross

monotouch,xamarin,mvvmcross

I should have paid closer attention to the Output Window. I recreated the BestSellers sample from scratch as there were issues with Missing methods and Nuget packages. My Setup.cs in the iOS project was not calling EnsureLoaded on the DownloadCache PluginLoader. I discovered this the long way by going through...

MVVMCross, WPF, XAML “Unable to resolve the binding creator - have you initialized Windows Binding”

wpf,xaml,mvvm,binding,mvvmcross

As directed by Stuart, I checked out this document, which described Tibet and Rio in Xaml. I was missing this bit of code in my Setup.cs class. protected override void InitializeLastChance() { base.InitializeLastChance(); var builder = new MvxWindowsBindingBuilder(); builder.DoRegistration(); } After I pasted that in, everything worked fine. Thanks!...

Get local url for MvxStandardTableViewSource ImageUrl

binding,xamarin,mvvmcross

For local images on iOS you must add res: prefix to your url string. Your image url might then look like this: "res:myimage.png" Note: The path above works if your images are placed in Application root or Resources folder. If you have your images in any other location then you...

Visibility binding on TextView not working

c#,android,mvvmcross

You're missing a : in your TextView binding there: localMvxBind="Visibility Visibility(ConfirmLockVisible)" should be local:MvxBind="Visibility Visibility(ConfirmLockVisible)"...

MVVMCross Android: value with binding not updated

c#,android,binding,xamarin,mvvmcross

Is your "timer" running on a background thread? If it is, then you'll need to find some way to signal the RaisePropertyChanged on the UI thread. One easy way to do this is to inherit from MvxNotifyPropertyChanged - it will automatically marshal the notification on to the UI. Another is...

NullPointerException while trying to replace a fragment

android,android-fragments,xamarin,monodroid,mvvmcross

The problem was in a preceding code and not related to above snippet at all. Sorry.

Show ViewController from inside plugin

ios,plugins,touch,viewmodel,mvvmcross

If your View is really reusable across apps, then you can make it accessible by registering it with the IMvxViewsContainer. To do this you can put some code in your Touch plugin assembly - something like: Mvx.CallbackWhenRegistered<IMvxViewsContainer>(() => { var container = Mvx.Resolve<IMvxViewsContainer>(); container.Add<MyViewModel, MyView>(); }); See interface definition at...

MvxValueConverter breaks bindings

xamarin,monodroid,mvvmcross

The problem was in base virtual methods of MvxValueConverter public abstract class MvxValueConverter : IMvxValueConverter { public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return MvxBindingConstant.UnsetValue; } public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return MvxBindingConstant.UnsetValue; } } as you can...

What is the difference between Mvvmcross nuget package and Mvvmcross.HotTuna.CrossCore?

monotouch,xamarin,mvvmcross

1) There is no actually any difference between Mvvmcross nuget package and Mvvmcross.HotTuna.CrossCore. Both are associated with each other and is just a package name. You can see if you install anyone of above the result will be the same (just check out version). It will install a) Mvvmcross b)...

How to update ViewModel from View in mvvmcross

xamarin,mvvmcross

What you can do is you can use the View's ViewModel property and cast it to your type of ViewModel. After that you can access everything that you want to execute or change. A very simple example using Droid and Core projects would be: MainView using Android.App; using Android.OS; using...

Registering same singleton for multiple interfaces in IOC

c#,xamarin,mvvmcross

You can register a factory for the singleton which can produce a singleton manually and return that whenever anyone wants to call it. See the docs for Lazy Singleton Registration ThemeService singletonService = null; private ThemeService GetThemeService() { if (singletonService == null) { singletonService = new ThemeService(Mvx.Resolve<IMvxJsonConverter>(), Mvx.Resolve<IMvxResourceLoader>()); } return...

Windows Phone 8.1 MVVMCROSS ViewModel is null

windows-phone-8.1,mvvmcross

Never mind, I don't know why but today it is working. Strange, I didn't change the code at all.

How to bind a NSLayoutConstraint's constant properly?

ios,monotouch,xamarin,mvvmcross

I think the problem is that iOS needs you to call LayoutIfNeeded (or similar) after setting the constant. e.g. in order to animate a constraint constant change, see Are NSLayoutConstraints animatable? For binding, you could probably do this using a property on your View like: public float PicHeight { get...

App crashs when re-activating from App-List

windows-phone-8,xamarin,mvvmcross,reload

I found the answer (at least for me). Just look at the following link: http://www.codecoding.com/fast-app-switching-and-mvvmcross-how-to-make-it-work/ This solved my problem...

How to Send Brodcast from MVVMCross ViewModel

xamarin,mvvmcross

As @nikola suggested, by using Messanger pluging, one can make native calls from ViewModel. More information : Executing UI Code from ViewModel on MVVMCross...

Automapper starting exception in Windows 8.1 Unified project

c#,.net,windows-phone-8.1,automapper,mvvmcross

Is this happening while debugging? If so, you're likely showing all exceptions, instead of just uncaught exceptions. Switch to uncaught-exceptions and you should be good. The 4.0 release of stupid AutoMapper is moving away from platform-specific extension assemblies and instead is doing compiler directives to compile into a single assembly...

Activator with MvvmCross and PCL

xamarin,windows-store-apps,mvvmcross

Thanks for all the answers. I am feeling a little embarrassed now, because I figured the problem out and it was totally my fault :). @Anders: You was right, I misspelled the Activator in the Immediate windows and that is why the error was there in the first place -...

Unable to distribute Xamarin iOS iPad archive because of “Missing required icon file”

monotouch,xamarin,mvvmcross,ios8.1

It looks like I actually had everything set up correctly. This is an error in the latest version of Xamarin iOS 8.6.0. You can find the fix here: https://bugzilla.xamarin.com/show_bug.cgi?id=25569...

Cannot resolve SupportFragmentManager in MvxFramentActivity

xamarin,mvvmcross

Check if your target API level and minimum API level are lower than 14. If yes, probably you will need to use Support V4: using FragmentManager = Android.Support.V4.App.FragmentManager; I hope you will solve....

MVVMCross Custom Control and Binding

xamarin,monodroid,mvvmcross

I ran into similar issue with CardView control. Since CardView directly inherits from FrameLayout I decided to use implementation almost identical to MvxFrameControl (Thanks Stuart for pointing out MvxFrameControl sample): public class MvxCardView : CardView, IMvxBindingContextOwner { private object _cachedDataContext; private bool _isAttachedToWindow; private readonly int _templateId; private readonly IMvxAndroidBindingContext...

MvvmCross Checkbox bind to command android xml

android,user-interface,xamarin,mvvmcross

Standard approach would be to simply bind to property of type bool in your viewmodel and perform your logic in setter of this property. Your binding will then look like this: local:MvxBind="Checked IsChecked" However if you really need bind to Command, you can also bind to Click event: local:MvxBind="Checked IsChecked;...

UIActivityIndicatorView.StartAnimating overriding UIActivityIndicatorView.Hidden binding

monotouch,xamarin,mvvmcross

Some options you can do: Subscribe to PropertyChanged changes and write custom code in the event handler (as you suggest in your question) Inherit from UIActivityIndicatorView and write a public get;set; property which provides the composite functionality (calling Start and Hidden) in the set handler public class MyIndicatorView : UIActivityIndicatorView...

Xamarin MvvmCross ViewModel Validation

validation,mvvm,xamarin,mvvmcross

I use MVVM Validation Helpers http://www.nuget.org/packages/MvvmValidation/ It's a simple validation library that's easy to use. It's not tied to MvvmCross. Here's how I use it, for example, in my SigninViewModel: private async void DoSignin() { try { if (!Validate()) { return; } IsBusy = true; Result = ""; var success...

Xamarin MvvmCross Android Prevent Back Button returning to previous View

c#,android,xamarin,mvvmcross

I had the same problem. Just implement a custom Presenter, that sets some intent flags, if you want to achive this: public class CustomAndroidPresenter : MvxAndroidViewPresenter { public override void Show(MvxViewModelRequest request) { if (request != null && request.PresentationValues != null) { if (request.PresentationValues.ContainsKey("MyCustomFlag")) { // Get intent from request...

MvvmCross RaisePropertyChanged and dot (.) binding

c#,binding,xamarin,mvvmcross

Try to add Property Self to your ViewModel or View which retuturns itself. Then just bind to that Property instead of dot (.) syntax: public MyViewModel Self { get { return this; } } Hope this helps...

Has anyone gotten Xamarin-Sidebar, MVVMCross & Storyboards to work together?

menu,xamarin,storyboard,mvvmcross,flyout

So after looking over the code that Martijn posted and then actually doing some snooping through his previous posts, I decided that it would be best to create my own MvxViewPresenter and so far it works. public class SideBarControllerTouchViewPresenter : MvxModalSupportTouchViewPresenter { private UIWindow _window; public SidebarController SidebarController { get...

Set view element BindingContext - mvvm cross

mvvmcross

You can't currently do this directly in a single axml file in MvvmCross at present. However: You can use MvxFrameControl to load a sub-axml file (a bit like an include) and then set the DataContext for everything inside that sub-view MvvmCross is open source - so you can extend and...

Multiple Views for single ViewModel (iOS)

ios,monotouch,xamarin,monodroid,mvvmcross

The default Container in an Mvx Touch application creates views using code like: CurrentRequest = request; var viewType = GetViewType(request.ViewModelType); if (viewType == null) throw new MvxException("View Type not found for " + request.ViewModelType); var view = CreateViewOfType(viewType, request); view.Request = request; return view; from https://github.com/MvvmCross/MvvmCross/blob/1eeea41e110934e52bf7e6682d8751b885206844/Cirrious/Cirrious.MvvmCross.Touch/Views/MvxTouchViewsContainer.cs#L31 Each View then loads/locates...

Binding to Text property ios-unified not working

c#,binding,monotouch,xamarin,mvvmcross

There are some issues that some people are seeing, others are not, with the new GC in the latest Xamarin "stable" releases (maybe differences between VS and XS - it's not clear...). You can read about these on https://github.com/MvvmCross/MvvmCross/issues/902 (with some background on Migrating to Unified API and new reference...

UICollectionView Help What is the Best Way for adding section in MVVMCross Xamarin?

monotouch,xamarin,mvvmcross

To add supplementary views within a UICollectionView, you'll need to override the CollectionViewSource to provide them. The base code for this in MvvmCross is in https://github.com/MvvmCross/MvvmCross/blob/3.5/Cirrious/Cirrious.MvvmCross.Binding.Touch/Views/MvxCollectionViewSource.cs and https://github.com/MvvmCross/MvvmCross/blob/3.5/Cirrious/Cirrious.MvvmCross.Binding.Touch/Views/MvxBaseCollectionViewSource.cs A good Xamarin tutorial for CollectionViews is...

MvvmCross MvxListView and MvxItemTemplate. How do I get a table to display correctly?

c#,android,xamarin,mvvmcross

This was actually a really easy fix as the problem was with me being a noob to Android. All I had to do was put a fixed width on the EditTexts... <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res-auto" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <EditText android:layout_width="300dp" android:layout_height="wrap_content" style="@style/InputEditText"...

MvxAutoCompleTextView loses binding on PatialText

c#,android,mono,mvvmcross

Android's AutoCompleteTextView is a real PITA. The likely reason you are seeing that "the setter of the property bound to PartialText never gets called." is because the control is still waiting for the ItemsSource to be updated from a previous change. I had the same issue and answered it here,...

MvvmCross custom binding display dialog

android,xamarin,mvvmcross

Found a way to implement it: var act = (Activity) Target.Context; dialog.Show(act.FragmentManager, "date"); ...

App crashes when navigating back to MvxTabsFragmentActivity

android,xamarin,mvvmcross

answer came from @Stuart ; fixes in https://github.com/MvvmCross/MvvmCross/pull/915 Currently NuGet package for FullFragging isn't working yet, need to build the FullFragging dll yourself for now. ...

No IMvxImageHelper registered

android,imageview,mvvmcross,imageurl

Install the DownloadCache plugin and MVVMCross File plugin

MvvmCross Android MvxListView DrawableName not refreshing

android,xamarin,monodroid,mvvmcross

Try : inheriting VehicleStatus from MvxNotifyPropertyChanged within VehicleStatus signal the changes using RaisePropertyChanged() calls as the changes happen For a bonus point, it might also be good to use a converter to change the Selected property into the DrawableName one automatically....

Xamarin Build failed. An exception was thrown while dispatching a method call in the UI thread

xamarin,mvvmcross,xamarin-studio

As an answer to your comment. Disabling Version Control in Xamarin Studio: Tools -> Options -> Version Control -> General -> "Disable Version Control globally" ...

ViewModel is null during ViewDidLoad

ios,xamarin,mvvmcross

I'm guessing here the problem here will be specific to the way that TabBarViewController is constructed. ViewDidLoad is a virtual method and it is called the first time the View is accessed. In the case of TabBarViewController this happens during the iOS base View constructor - i.e. it occurs before...

UILabel not wrapping in UITableView until device rotate (iOS8)

monotouch,mvvmcross

UPDATE: I've forked your GitHub project and submitted a pull request. But here's my updates to your project. https://github.com/SharpMobileCode/TableCellResizeIssue First, you're using FluentLayout for your constraints. Nothing wrong with that actually, but that's some good info to tell others. :) Second, in order for UITableView.AutomaticDimension to work on TableView Cells,...

MVVMCross MvxDatePicker Binding in Android AXML

android,binding,xamarin,mvvmcross

Bind to the "Value" property instead of the "DateTime" property. <MvxDatePicker ... local:MvxBind="Value CustomReminderDate" android:calendarViewShown="false" /> Though these properties yield the same underlying DateTime value, the "DateTime" property is declared on the native Android DatePicker while the "Value" Property is declared on the MvvmCross ancestor, MvxDatePicker, and is designed for...

MvvmCross: Binding warning on iOS device

ios,binding,xamarin,mvvmcross

As Stuart told, including the Border properties in LinkerPleaseInclude made it.

MvvmCross - On View Loaded Event in Android

android,wpf,xamarin,mvvmcross

The ViewModel for MvxView is populated by MvvmCross for you. For Wpf it happens here. The same applies for Android. You'll have access to the ViewModel in OnCreate(). If you inherit your view from MvxWpfView<MyViewModel>, you won't need the cast. So you can access with a property or however... public...

Policy Handle issues in conjunction with Refit package and Xamarin

c#,monotouch,xamarin,mvvmcross,refit

If ApiException is being thrown that means that Polly retried 5 times to execute your code and failed each time thus it all ended with ApiException and you need to handle it. What's the point of having the Handle parameter up top if it doesn't do anything? Handle specifies which...

Developing Xamarin.iOS application using MVVMCross and Storyboards

monotouch,xamarin,mvvmcross

The iOS ViewController is actually the View in an MVVMCross application. You can think of the view controller as the code behind for the view (so just like a Windows Phone/Windows Store app will have a XAML and related .cs file, or an Android app will have an axml and...

How to make Parse work with Xamarin's PCL project and MvvmCross?

c#,parsing,xamarin,mvvmcross

So I got it working fine on both Android and iOS by referencing Parse.Android.dll in all 3 projects (Core, iOS, and Android). Yes it sounds weird, but that's what's working for me. Just go to Parse download page and download Xamarin SDK under Android section. It works wonders too! No...

Mvvm cross binding data context

android,data-binding,mvvmcross

I'm not sure if that's what you are asking, but to make a binding of the person's name to the listitem textview: local:MvxBind="Text Name" And instead of using a List you should use an ObservableCollection ObservableCollection<Person> _personCollection; ObservableCollection<Person> PersonCollection { get { return _personCollection; } set { _personCollection = value;...

The type 'System.ComponentModel.INotifyPropertyChanged' is defined in an assembly that is not referenced

android,xamarin,monodroid,mvvmcross

I have looked into the code, and there is actually nothing wrong with that converter. The reason it is failing is that you have references to System.ObjectModel and System.Runtime that point to wrong versions of those classes. You can see that because there is a "red X" behind their names...