Prism + Xamarin Forms: around 1.2 seconds more compared to just using Xamarin Forms - prism

Package info
Platform: Android
Prism version: 7.0.0.336-pre
Xamarin version: Android 8
Other version info: Xamarin Forms, Xamarin Forms 2.5.0.121934
Repro steps
I create a simple XF + Prism app with DryIoc, based on the VS template.
I noticed a 1.2 seconds difference in the startup when using Prism compared to not using Prism.
When not using Prism, I still created the same view-model object and set it to View by calling in View's c-tor BindingContext = new MainPageViewModel()
I'm curious, based on the Prism for XF implementation, what's the main reason of this difference? Is it the dependency injection? DryIoc seem pretty fast though.

Related

How to use PDFNet pdfviwer with annotations in Xamarin Cross platform (xamarin forms in PCL)

I want to implement PDF Viewer with annotations in Xamarin Cross Platform apps (UWP, Android & ios). As per suggestion on (https://components.xamarin.com/gettingstarted/pdfnet-mobile-sdk?version=1.0.0). How can we implement PDFnet PDFViewer in Xamarin Forms portable library? since they written separate libraries and code for different platforms or should we use native apps?.
That is an old version that is no longer updated. To get the latest Xamarin SDK please fill in this form.
https://www.pdftron.com/pdfnet/mobile/request_trial.html

XAML in Xamarin.iOS and Xamarin.Android

I was giving an interview for a company and I was told by the architect that they are creating iOS apps from Xamarin.iOS ( NOT Xamarin Forms) with MvvmCross framework and they use storyboards for UI. But if the UI is very simple they use XAML to create them.
I never knew we can use XAML for Xamarin.iOS and Xamarin.Droid. We had a small discussion/argument if that's even possible. He said they were using it successfully.
My question, is it really possible to use XAML in Xamarin.iOS and Xamarin.Droid. Because, if we can do that, I feel no use of using Xamarin forms.
If yes, can anyone provide some kind of documentation?
Thank you.
There is no way to design UI in XAML using Xamarin.Android or Xamarin.iOS, but you can include Xamarin.Forms page in Xamarin.Android or Xamarin.iOS app. This way you can have native app with UI using storyboards, but with some Xamarin.Forms pages designed in XAML.
There is a sample how to do that in Xamarin Forms samples project on GitHub.
Only Xamarin Forms support sharing of UI via XAML.
UI for iOS has to be made using xib or storyboard.
For Android using AXML.
Windows Phone, UWP, WinPhone Silverlight, Windows can use XAML for UI.

PrismApplication not allowing Xamarin forms to initialize

I have a UWP, Xamarin forms sample from http://thatcsharpguy.com/post/xamarin-forms-uwp/
I am trying to add prism by changing the app to a PrismApplication and can't figure out how to call Xamarin.Forms.Forms.Init(e); before the app class constructor call.
I get a {"You MUST call Xamarin.Forms.Init(); prior to using it."}.
Where can I call this?
I'm not sure exactly what you are doing because you haven't provided any code, but you don't have to do anything special to the UWP app. Set the UWP app up like a normal Xamarin Forms application. The only place you will modify is the Xamarin Forms PCL project. To make it easy, just use the Prism Template Pack from the visual studio gallery. Create a new Xamarin Forms Prism application and everything will be hooked up for you.
https://visualstudiogallery.msdn.microsoft.com/e7b6bde2-ba59-43dd-9d14-58409940ffa0

MVVMCross Unified Announcement

I am new to MVVMCross and ~6 Mos with Xamarin…
From the Xamarin blog post today : http://blog.xamarin.com/unified-api-and-64-bit-support-complete/
What does that mean as far as MVVMCross is concerned?
I am using MVVMCross 3.2.2 Xamarin Forms (Android, iOS, WinPhone 8.0) and added a Universal Project for Windows Store/Phone 8.1.
MVVMCross and all of the plugins will have to be updated to support the new Unified API that is currently in Alpha. Once they release this you can migrate your iOS application over.
I know that Stuart and Thomasz have already been working on this though. Ideally, if you read through the post you should look to migrate around January 5th when it hits stable.

Using Dependency Injection in Xamarin for Mac

I am creating a simple application with Xamarin for Mac.
I need to provide a decouple architectural elements into solution, but haven't found any information on dependency injection in Xamarin for Mac.
Xamarin.Forms seems to have an IoC NuGet packages, but it is not possible to add Xamarin.Forms into a Xamarin.Mac project, since the current version of Xamarin.Forms (1.2.2) isn't compatible with .Net 4 targeting projects (Xamarin for Mac by default targets .net 4)
Please point me to some information on IoC in Xamarin for Mac.
There's a pretty good article by Rob Gibbens, a Xamarin University instructor, on using IoC containers in Xamarin projects.
IoC Containers with Xamarin
The examples are using Xamarin.iOS for illustrative purposes but I have to imagine that it could work with any of the Xamarin platform projects.
Personally I am a fan of Autofac in general and have played around with it in Xamarin before and it seems to work fine.

Resources