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.
Related
My aim is to be able to reuse Xamarin Forms pages in my xamarin.ios project. I know that it is possible for ios extensions. However, can it be achieved in an xamarin.ios application project?
I am very new to Xamarin.Forms android , IOS applications.
And I have small project in WPF which have some controls like openGL control, Windows, Usercontrols. And I need to convert my wpf project into Android and IOS Application using Xamarin.Forms.
I will create other UI Components like labels, buttons, Textbox in Xamarin.Forms but i need to use the Same WPF usercontrols, windows in Android , IOS Application.
Is there any way to do this?
No. iOS and Android do not have any mechanism to render these controls.
Currently, we have a Cordova plugin and a UWP Class library. The library is using native UIElements for different UI workflows. Is there a way to display those UIElements? I read, that XAML views can't be displayed. Is there a workaround somehow?
Cordova is using the WebViews. So, we just have the WebView environment. But yes, somehow use the XAML view, or communicating with it.
Yes. Cordova is using the WebViews in Android and IOS, but not in Cordova UWP. The low level of Cordova UWP actually is using javascript. The XAML view also is not available.
So, your requirement is impossible.
The iOS specific Telerik Xamarin calendar control seems smoother than the cross-platform Forms version. Is it possible to have a Xamarin.Forms project that uses the platform specific Telerik controls on some screens?
Yes, you can do this via a Custom Renderer or with Native Embedding.
I have developed an app/component using Xamarin.Forms and as per the requirement I need to integrate that component with another app which is developed on Xamarin Native in Android as well as iOS.
Kindly help me with the suggestions or references
I've seen something like that on a sample called Native2Forms.
What it does, at least in Android, is to use a separete activity to integrate the Xamarin Forms PCL (FormsActivity).