Configure Xamarin.Forms XAML intellisense in Visual Studio

There is a plugin available for Visual Studio to enable intellisense for Xamarin.Forms XAML.

Don’t believe me. Here is how I saw before the XAML intellisense is installed.

WithoutIntellisense

 

Let’s configure it in Visual Studio. 

Read More

Xamarin.Forms.DependencyService platform tweaks

What is DependencyService in Xamarin ?

DependencyService is a static class under Xamarin.Forms namespace. Shared or Portable projects can access the platform based tweaks that are done in any specific platform projects by using DependencyService.

How it works?

The key point is by defining an Interface.

  • Declare an Interface in the Shared / Portable project.
  • Implement the interface in platform specific projects.
  • Register the class under DependencyService Assembly with Dependency attribute.
  • Call the DependencyService.get method with the Interface. It will identify the platform and executes the implementation

Xamarin.Form.DependencyService

 

Read More

Xamarin.Mobile : Cross platform component for Device APIs

Xamarin.Mobile is a component from Xamarin to write a commonly used code to consume the device API.  What I meant by the commonly used code is, the same code that will can access device specific APIs and behave accordingly depending upon the platform in which it is running.

More than a month back newest release of Xamarin.Mobile is still in its preview release mode.

As of now, it supports the following device APIs for iOS, Android and Windows Phone.

  • Contacts
  • Geolocation
  • Media

Xamarin.Mobile

 

Read More

How it compiles in Xamarin

What we must agree is, different platforms have different ways of understanding the assemblies. They execute and run the app in the same way. So Xamarin compiles the app in relevance to the platforms basing upon their nature and behavior of executing the assemblies.  So that the app assembly fits to the platform acceptable format  and run.

Compiling for iOS

iOS runs on ARM architecture. So the nature of iOS is, it understands the assembly language for ARM. It never allows the code to be generated dynamically during run time. So to respect the same, Xamarin did it exactly. It uses the Ahead Of Time (AOT) compilation process in order to generate ARM assemblies from the static code. This is a process to generate the pre-compiled code. Unlike the traditional on-demand execution approach, it compiles the code before hand. During the linking process, it links the .Net framework and the relevant assemblies only. It removes all others, which are no longer in use. 

Read More

[Proved] Xamarin Forms Content page can contain a single view

Xamarin Content page can contain a single view in it without any layout. Yes, that’s correct. But sometimes crazy thoughts strike to mind . Why should I believe unless I try that out?

You believe ??? But let me check before I agree with you

I am going to create a new Xamarin.Forms.Portable project using Visual Studio. Let me name this as “TryContentPage”. It will create 4 different projects out of which one is the Xamarin.Forms.Portable project and rest three of them are for platforms like iOS, Android and Windows Phone individually.

CreateProject

For now let’s ignore the other projects and concentrate on the Portable project only. To start with our experiment, let me add a XAML Form to that project and name it as “MyFirstPage” .

Read More

How to setup Xamarin Build Host with Visual Studio

The cross platform app development with Xamarin Forms allows to create multiple platform development projects under a single Visual Studio solution. It is easy to build app for Android and Windows Phone in Windows with Xamarin using Visual Studio. But for the iOS development we need XCode, which can only be installed in a MAC

Read More

[Solved] SmartDeviceException – App deployment failed in Windows Phone Emulator

The Issue When I tried to run my windows phone app in the emulator I was receiving the following error. **Error 1 Error : DEP6100 : The following unexpected error occurred during boostrapping stage ‘Connecting to the device’: SmartDeviceException – App deployment failed. Please try again.  The error was just killing me. It was another

Read More

Different pages in Xamarin

Pages are the basic components for application building. Pages when compiled to the iOS native app gets converted to UIViewController, Activities for Android and Pages for Windows Phone. Xamarin supports following type of pages.

Pages in Xamarin

Content page

  • Creates a simple page with single view
  • Contains scrollview or stack layout
  • Most commonly used type page

Read More

Upload Failed : You uploaded a debuggable APK

It was quite late in the evening and I was about to wrap up my work. Suddenly I got a call form my client in Skype and he shared his concerns of uploading the build to production. Although it was late, I thought to help him before I close the day, since that guy is in

Read More

1 2 3
%d bloggers like this: