Colombo Xamarin Meetup – June 2017 -[Session 2] – Xamarin Forms Rich UI Controls – By : Buddhima Kudagama

Session 2 : Xamarin Forms Rich UI Controls

Hi Guys, This is our 8th Meetup of Colombo Xamarin Meetup group. I’m happy to say you that we have successfully done our meetup on 29th June 2017 in CMS , Colombo with two sessions.

I have done the 2nd session about Xamarin Forms Rich User interface controls with a demo and this article is about my session.



Image 1 : Colombo Xamarin Meetup

Click below link to Download the Slide of Session 2 –

[Xamarin forms Rich UI Controls] : Meetup20170629.Buddhima.ppt

You can have the sample App here…

What are the the rich UI controls available for Xamarin forms ?

I found some third party controls which are available for xamarin forms and xamarin native development and here are some main providers and their controls…


Image 2 : Rich UI control providers

Syncfusion –

Infragistics –

Telerik –

DevExpress –

First of All you should have a idea about Layouts, Pages, Views and Controls in Xamain Forms Mobile applications..

So Please Use these reference to learn them…

How to Design the User Interface(UI) in Xamarin Forms ?

There are two main methods :

  1. Design using XAML (Extensible Application Markup Language)
  2. using C# code in code behind

but you can design the UI using both of them…

What’s going to do ?

Syncfusion is better to develop Xamarin apps because of …


  • It gives a community license
  • and It has large number of controls than other third-party control providers.
  • Its very flexible to use
  • Good customer support etc.

How to Get the Free Community License ?

To get the community licence, go to..

When you claim the license by registering with syncfusion , they will send you the licence code for the product and you have to use it in the installation of the package…

How to Get the Syncfusion Packages to the Application ?

There are two methods to get the packages..

  1. Get using NuGet
  2. Direct Download using web site

You can follow the user guide to see how to download and Install the package in both of above methods..

Click here to see the user guide for download and installation …

How to Download Syncfusion Xamarin from Nu Get ?

In Visual Studio go to …

  1. Tools -> Options -> NuGet Package Manager -> Package Sources. By default You can see default NuGet packages are there.
0. default packages.jpg

Image 3 : Add new packages to NuGet Gallery

  1. To Add Syncfusion packages, Click Add Button in the top Right side..
  2. Then Copy and paste below URL in the bottom of the window like following image..

When you add the name and source, Click “Update” and then Click “OK

1. add nuget.jpg

Image 4 : Add Syncfusion Packages to NuGet Gallery

Now you can search the Syncfusion controls in the NuGet Package manager in Visual Studio..

Now right Click on the Solution -> Manage NuGet Packages for Solution -> you will see the Package Manager dialogue like below and you will see the Syncfusion packages has been added in package sources drop down list..

2 sf in pkg mgr.jpg

Image 5 : Select Syncfusion Packages

Click on Syncfusion Packages and then the syncfusion packages will be loaded to the list.

3 packages will be loaded.jpg

Image 6 : Search NuGet packages

Syncfusion Controls for Xamarin

There are many useful controls for Xamarin has been provided by Syncfusion and I have added them to my power point Slide and please see to to get them..

You can see them here in their website..

and their user guide..

How to Manage References/Dependencies of Controls in a Xamarin Forms App ?

Here I have taken he dependencies for Syncfusion chart to explain how the dependencies need to be added to the solution.

4 references.jpg

Image 7 : Dependencies

I have highlighted Syncfusion.SfChart.XForms.dll in Green color here and It has been added to all projects in the solution. The reason is the dll contains the common xamarin forms features and behaviors of Chart controls for all projects. So it should be added to all.

And in Yellow color, I have highlighted the platform specific dll(class library) files that we have to be added to native projects.

The best practice is follow the Syncfusion user guide when adding dependencies to any of their controls.

You can have the List of dependencies here…

You have to take care of dependencies when you are adding the references manually to your projects.

But when you are adding any controls from NuGet, it automatically installed the necessary dependencies itself.

Lets Develop a Demo App

In the session I did show you how to add Syncfusion Auto Complete Control and how to customize it.

Now lets do from the scratch.. !

Lets add dependencies to the project..

I’m using Visual Studio 2017 for the demo and OS is Windows 10.

Open Visual Studio and Go to File -> New -> New Project

Select Cross-platform in the right side of the window and select Cross Platform app (Xamarin) in Left side which shows project templates..

Then Give a Name to the app. I’ll give “DemoApp” as the Name. and Click “OK”

6 Create project.jpg

Image 8 : Select Project type to create

Now you will see another window to Select the Project Template, UI technology and code sharing strategy.

I’ll select Blank app as Template, Xamarin forms as UI technology and PCL(Portable class library) as code sharing technology for my demo.

7 select type of ui.jpg

Image 9 : Select Template

Now the project will be created and you will see it like below… The project consists of PCL, Android, iOS and a UWP project.

8 default project.jpg

Image 10 : Created Solution with projects

Then I’ll add here three folders to separate Models, View Models and Views and then the project will be like below.

5 create project.jpg

Image 11 : Model, View and ViewModel folders Create

Now Lets Install the dependencies for Syncfusion Auto Complete Control (SfAutoComplete).

SfAutoComplete is a control just like a Combo box that we use in Windows and web application.

Syncfusion Auto Complete for Xamarin.Forms provides a simpler way to complete the text based on the letters that the we entered on the box. It also provides option to choose a suggestion from drop down or append a suggestion to the text directly.

For more info, Go to …

Install using NuGet

Right Click on the Solution and -> Manage NuGet Packages

Then Select the SfAutoComplete control, Add it to all project by check the check boxes in the right side of the window.

And then Click install… And follow below steps to add the package…

9 instal control.jpg

Image 12 : Add SfAutoComplete from NuGet

10 instal control.jpg

Image 13 : Conform install the package

11 instal control.jpg

Image 14 : Accept licence

Now you can see the SfAutoComplete libraries has been added to the projects inside the solution..

I’m going to create a Android application and so I’ll show here how the references has been added to PCL and Android projects..

12 added to pcl.jpg

Image 15 : SfAutoComplete reference has been added to PCL

13 added to android.jpg

Image 16 : SfAutoComplete references has been added to Android

Now, Lets Start Coding…

Create Model

First I’ll create a Model inside of the Model Folder which “Student”..

namespace DemoApp.Model
public class Student
private int id;
public int ID
get { return id; }
set { id = value; }
private string name;
public string Name
get { return name; }
set { name = value; }

private string image;
public string Image
get { return image; }
set { image = value; }

Create View Model

And will Create A ViewModel inside the ViewModel folder as “StudentViewModel”. and I have created a Collection of Stundets in it as “StudentCollection”.

namespace DemoApp.ViewModel
public class StudentViewModel
private List<Student> studentCollection;
public List<Student> StudentCollection
get { return studentCollection; }
set { studentCollection = value; }

public StudentViewModel()
studentCollection = new List<Student>();
studentCollection.Add(new Student() { ID = 1, Name = "Buddhima", Image = "Student.png"});
studentCollection.Add(new Student() { ID = 2, Name = "Buddhika", Image = "Student.png"});
studentCollection.Add(new Student() { ID = 3, Name = "Dickson", Image = "Student.png" });
studentCollection.Add(new Student() { ID = 4, Name = "Janith", Image = "Student.png"});
studentCollection.Add(new Student() { ID = 5, Name = "Vidura", Image = "Student.png"});
studentCollection.Add(new Student() { ID = 6, Name = "Charitha", Image = "Student.png" });
studentCollection.Add(new Student() { ID = 7, Name = "Vimukthi", Image = "Student.png"});
studentCollection.Add(new Student() { ID = 8, Name = "Buddhi", Image = "Student.png"});
studentCollection.Add(new Student() { ID = 9, Name = "Buwaneka", Image = "Student.png"});

in the above code you can see there is a property called “Image” which is a image to show the student. So I have added an  Image in the Android project.

To add Images we have to go to Resources folder in Android project and there are separate folders to add images for different dimensions of devices which are drawable, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi. The image has to be added to all folders according to compatible sizes with the same name.

14 Image added.jpg

Image 17 : Add Images

Design the View/User Interface

Right Click on Views folder and Click Add..

Select Xamarin forms -> and Content page as template -> Give a name -> Click OK

15 add view.jpg

Image 18 : Add a View

Then the View will be added inside of the folder with its default template with a XAML UI and a C# code behind class. (StudentView.xaml and StudentView.xaml.cs).

StudentView.xaml may be like below code…

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="" xmlns:x="" x:Class="DemoApp.View.StudentView">
<Label Text="Welcome to Xamarin Forms!" />

StudentView.xaml.cs may be like below code…

using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace DemoApp.View
public partial class StudentView : ContentPage
public StudentView()

[XamlCompilation(XamlCompilationOptions.Compile)] annotation use to increase the performance of the UI in compiling which has been designed using XAML.

Now lets add the SfAutoComple to the View.

To Add any third-party Control to the XAML UI, we have to add its namespace into the Header of the Page.

So, I’ll add the namespace of SfAutoComplete  to the header of the Content Page.


And I’ll add the control inside a Stack layout.. The design of the view should be add inside the  tag.

We can call the control by the namespace that we have added to the page header and here you can see how we can call the SfAutoComplete control.


And then the Code of the view like below. You can see a label also inside the Stack layout which has added when create the form.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="" xmlns:x="" xmlns:autocomplete="clr-namespace:Syncfusion.SfAutoComplete.XForms; assembly=Syncfusion.SfAutoComplete.XForms" x:Class="DemoApp.View.StudentView">
<Label Text="Auto Complete control" />

Then Lets Bind Data to the SfAutoComplete control

I’m going to bind Student Collection as data to the control using MVVM pattern. and there are two ways to Bind data using MVVM (Model View ViewModel).

  1. using XAML
  2. using C# in code behind

SfAutoComplete Control allow us to Bind a List of Strings or a List of Business Objects as the DataSource. In this Example I’m binding a List of Students to the control.

To learn more about MVVM in Xamain Please follow these links..

In this example, I’ll bind data using XAML.  And will set the Binding context to the View using code behind.

Now I’mm Bind the Student View Model to the StudentView Page. We have to set the binding context inside the constructor of the view page.

public partial class StudentView : ContentPage
public StudentView()
this.BindingContext = new ViewModel.StudentViewModel();

And then need to Bind the DataSource to the SfAutoComplete Control. In XAML page, bind StudentCollection List in the StudentVoewModel to the DataSource Property as below.

<autocomplete:SfAutoComplete DataSource="{Binding StudentCollection}">

Set the Student View Startup page …

Set the main page to StudentView in App.xaml.cs in PCL project..

public App()

MainPage = new DemoApp.View.StudentView();

But when you run the android app, it will not show the data inside of the control.

The reason is you haven’t bind the display value to it.

Then Lest set the additional attributes..

Now we can set which value can be show inside the Control and what will be the Selected Value of the control.

DisplayMemberPath – What should me the display member

SelectedValuePath – what should be the selected value

<autocomplete:SfAutoComplete DataSource="{Binding StudentCollection}" DisplayMemberPath="Name" SelectedValuePath="ID">

Lets compile and run the app  and it will show the list of students when searching..  By default it suggest data by the starting characters that we are typing.


16 basic data binding.png

Image 18 : Simple SfAutoComplete with Data Binding

So, we have to set the Suggestion mode too. And also we can set the Autocomplete Mode too.

Lets Do it ..

There are 8 main suggestion modes and I’ll select “StartsWith”

17. suggession mode.jpg

Image 19 : Suggestion modes in SfAutoComplete

There are 3 Auto Complete modes and I’ll select “Suggest”.

18 auto complete mode.jpg

Image 20 : Auto Complete modes in SfAutoComplete

Now Lets Customize the AutoComplete control..

now I want to show Student’s image, Name inside the control when searching..

So, I’ll add a data template to the AutoComplete control now.

to do it, we can use the autocomplete:SfAutoComplete.ItemTemplate tag. and we can and we can design the template inside it. in this example I’ll use a Grid View to design the template and below you can see the code. Also I have bind data to the controls which are in the grid.

<Label Text="Welcome to Xamarin Forms!" />
<autocomplete:SfAutoComplete DataSource="{Binding StudentCollection}" DisplayMemberPath="Name" SelectedValuePath="ID" SuggestionMode="StartsWith" AutoCompleteMode="Suggest" >
<RowDefinition Height="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<Image Grid.Row="0" Grid.Column="0" Source="{Binding Image}" WidthRequest="30" VerticalOptions="FillAndExpand"/>
<Label Grid.Row="0" Grid.Column="1" Text="{Binding Name}" HorizontalOptions="FillAndExpand"/>

Lets Run the app…

19 custom auto complete.png

Image 21 : Customized SfAutoComplete

It runs successfully…

For more details about SfAutoComplete control please go to this link and you will be able to learn more about it… Including events, Customize the design etc…

You can have the sample App here…


Thank you !

‘Xamarin.Android.Support.Design 25.3.1’ is not compatible with ‘Xamarin.Forms constraint: Xamarin.Android.Support.Design (= 23.3.0)’. – How to fix it ?

Why ?

When I was trying to update the NuGet Packages for one of my Xamarin projects, I got an error saying “Unable to resolve dependencies.” and the packages wasn’t updated.

The detailed error message is …

Unable to resolve dependencies. ‘Xamarin.Android.Support.Design 25.3.1’ is not compatible with ‘Xamarin.Forms constraint: Xamarin.Android.Support.Design (= 23.3.0)’.

1 error

Image 1 : Error

The reason for the error was…

The Android project of my Xamarin solution has been configured to Compile using Android 6.0(Marshmallow) API 23.3.0 . But I was trying to update the Android packages for Android 7.1 (Nougat) API 25.3.1.

3 current versions

Image 2 : Current Android application properties(Compile using Android 6.0)

So the target compilation version is not compatible with the updating version of Android packages.

How To Fix the Error ?

To fix the error we have to change the target framework for compile to “Android 7.1(Nougat)”.

Here are Steps to change the target compile framework..

2. go to properties

Image 3 : Right Click on Android Project -> Properties

3 current versions

Image 4 : Current Android application properties(Compile using Android 6.0)

4 select api nouget

Image 5 : Change Compile Android Version to Android 7.1 (Nougat)

When Change the target compilation version of Android , Visual Studio will ask you to restart the project to configure itself…

5 restart project

Image 6 : “Yes” to close and reopen

6 lading

Image 7 : App is loading

7 go to nuget

Image 8 : Again go to NuGet package manager to update Android packages

8 download

Image 9 : Select Android Packages v.25.3.1(or the package showing here)

9 accept

Image 10 : Accept to Agree licence and tearms

9 conform update

Image 11 : You can see changes will be happening (the old packages and new packages). Click OK.

10. installing packages

Image 12 : Then the packages will be downloaded and Install Successfully.

Then Re-Build the project and the app will run successfully…

Thanks !

Failed to create directory C:\Program Files(x86)\Android\Android-sdk\temp – How to fix it ?

Objective :

When Trying to install new packages/updates using Android SDK Manager, We can see some errors that “Unable to Install”. So Here are some errors I got when I got when I was trying to Install android API(s) and other package by Right Click and Run the app(Normal way).

Failed to create directory C:\Program Files(x86)\Android\Android-sdk\temp

4 error faild to create directory - Copy

Error 1

URL not found: C:\Program Files (x86)\Android\android-sdk\temp\ (Access is denied)

1 error

Error 2

How to Fix it ?

To Fix the error and Install the packages, what we have to do is Run the Android SDK Manager as Administrator..

First, go to C:\Program Files (x86)\Android\android-sdk and select SDK Manager.exe. 

Then Right Click and Run As Administrator.

5 run as administrator

Image 1 : Run as Administrator

6 loading packages

Image 2 : Loading packages

1 install ready

Image 3 : Select Packages to Install/Update

2 click install

Image 4 : Selected Packages

3 select and click install

Image 5 : Accept one by one to Install (Accept radio Button)

3 install sdk s

Image 6 : Accept all selected packages to install using “Accept Licence” radio Button

7 downloading

Image 7 : Downloading

8 finished downloading

Image 8 : Downloaded Successfully


Instead of Running as Administrator by going to Program Files, You can Open Android SDK manager using Visual Studio.

It will run the Android SDK Manager as Administrator itself.

Click the …  Tools -> Android -> Android SDK Manager

9. open in vs

Image 9 : Run SDK Manager using VS as Administrator

Thanks !

How to Check the App is running for the First time – in Xamarin Forms (Android/iOS/Windows)


In one of my Xamarin Forms apps, I wanted to check is the app running for the first time after the installation or the app is already installed and according to that Load different pages in the app

 How to Install Xamarin in Visual Studio 2017…


  1. If the App is running for the first time, I wanted to a Quick Start Guide to the user.
  2. If all has already installed, app will show the Login Form.


Then I looked for a solution and James Montemagno‘s  SettingsPlugin gave me the solution…

If you want to learn more, Click above links to go to GitHub and

How I did it ?

First I went through the Instruction of the above references and I installed the plugin using NuGet..

Here I’ll explain how I did it.. and Here is my project at the beginning.


1. First Install the Settings Plugin using NuGet packages.. Search  “Xam.Plugins.Settings”


2. Apply The package to all projects or selected projects.. (But I’m managing the settings from the PCL project) and Install the package..


3. Then Conform the installation..


4. When the packages has installed, It will generate a folder which is “Helpers” and a class onside it “Settings.cs” to manage settings.

It will added to all selected projects.


The default Settings class includes below C# code to manage settings..

using Plugin.Settings;
using Plugin.Settings.Abstractions;

namespace FirstTimeUse.Droid.Helpers
/// This is the Settings static class that can be used in your Core solution or in any
/// of your client applications. All settings are laid out the same exact way with getters
/// and setters.
/// &amp;lt;/summary&amp;gt;

public static class Settings
private static ISettings AppSettings
return CrossSettings.Current;

#region Setting Constants

private const string SettingsKey = "settings_key";
private static readonly string SettingsDefault = string.Empty;

public static string GeneralSettings
return AppSettings.GetValueOrDefault&amp;lt;string&amp;gt;(SettingsKey, SettingsDefault);
AppSettings.AddOrUpdateValue&amp;lt;string&amp;gt;(SettingsKey, value);


To read the more about the Settings class go to:

I’m going to store my value in the SettingsKey property. So I’ll change the default value of the SettingsKey property to “yes”. Which means the app is running for the first time.


private static readonly string SettingsDefault = "yes";

5. Now I’m going to use the Settings in the application..

I’m checking the app status in the App.xaml.cs class. Because the app navigating to the Main page happens in the constructor in App.xaml.cs class.

The default code of the App class is… And there are not properties in this class…

public partial class App : Application
public App()
MainPage = new MainPage();

protected override void OnStart()
// Handle when your app starts

protected override void OnSleep()
// Handle when your app sleeps

protected override void OnResume()
// Handle when your app resumes

Now I’ll add a Property to App class to Manage App Settings. The property name is “IsFirstTime” and type is String.


/// Get and Set value to General settings
/// &amp;lt;/summary&amp;gt;

public string IsFirstTime
get { return Settings.GeneralSettings; }
if (Settings.GeneralSettings == value)
Settings.GeneralSettings = value;

6. Now I’ll add another page to use for log in to system if the app has already installed.

Page name is “LoginPage.xaml”.


7. Now Lets Write code in App.xaml.cs to check the app status…

The page is initialize in the constructor of the App class. So I’m going to check the status of the app inside of the constructor.

And Here is the code. In the Settings class, I have set the default value as “yes“. So the app runs for the first time, the value should be “yes“. Then  the MainPage page will open. And when the app ran for the first time, it  sets the “IsFirstTime value to “no“.

Then when the user run the app after the first time, it will load the second page which is Logging Page.


public App()

// Check is the app running for the first time
if (IsFirstTime == "yes")
// if this is the first time, set it to "No" and load the
// Main Page ,which will show at the first time use
IsFirstTime = "no";
MainPage = new FirstTimeUse.MainPage();
// If this is not the first time,
// Go to the login page
MainPage = new FirstTimeUse.LoginPage();

8. The Build and run the app using emulator. I’m using my Samsung Galaxy J7 as the emulator. And the App was run  successfully.


First time it will open the Main Page


And When I run the app after the first time, It loads the Login page..




Thanks !

How to Fix Error “C:\Program Files (Access is Denied)” When Proguard has Enabled while Build a Android app

Why ?

When I was trying to build one of my android apps in “Release” mode to deploy, I got and Error that  “C:\Program Files (Access is Denied)” and the File was “PROGUARD”.


Then I looked for a solution to avoid the error.

What is Proguard ?

The Reason For The Error

In the Android project, I have set the Proguard Enabled before I build the app.

The reason for the error is there is a space in the path to the PROGUARD. Proguard is in the Android folder in Program Files (x86) and there is a spaces between “Program Files (x86)”.

C:\Program Files (x86)\Android\android-sdk\tools\proguard


So PROGUARD may unable to find the path..

So How to Fix This ?

What we have to do is Place the android-sdk folder to a path without spaces..

To do that I created a symbolic Link(sym-link) ..

Here are steps to create a symbolic link..

1 .First we have to download and Install the  Link Shell Extension.

To Download the Link Shell Extension , Click Here .. 

2. After Installed the Extension then we are ready to create the sym-link.

How To Create a Symbolic Link, Click Here…

Here are steps How I created according to my Folder structure..

First I create a Folder in C: drive outside of Program Files x86 which is “AndroidSysLink”. So we have to Link the Android-SDK path to this folder.

First Go to Program Files x86 and Right Click on Android Folder and we can see a new context menu “Pick Link Source”. Then Click it..


Then Go back and Select “AndroidSysLink” Folder -> Right Click . Then We can see a new context menu “Drop As” . When we click on it and we will see few options in another context menu. Then Select “Junction”. And then The link will be created.


3. Then We have to change the Android SDK path in Visual Studio.

So go to Tools -> Options -> Xamarin and Click the “change” button inside of the Android SDK location…

Then we can see a dialogue to select the sdk path..


4. Go to the Linked folder and copy the path in it..


5. Paste the Path in the sdk-path selection dialogue box.


Then Click OK…

6. Now The Path has changed an Click OK to conform the new SDK path..


7. Now we are ready to release the app. But before Build the app recheck the configuration in properties.

First Verify Target Android versions..


Make Sure the Confutation has set to “Release” and Proguard is Enabled..


8. Then Build The app in Release Mode..

The app will build successfully..


9. Now we are ready to Archive the Android App.

Right Click on the Android project and click “Archive“…


We can see Archiving Progress…


We can see a Settings I con with a Green icon when the app has archived successfully and in the bottom of the dialogue we can see build information.


Click the “Open” folder and the created .apk file will see in that folder.



Thanks !

How to Fix Error : Xamarin.Forms.Xaml.XamlParseException: Position 39:8. Type local:NoBorderEntry not found in xmlns clr-namespace:LoginApp;assembly=LoginApp

Why ?

I created a sample login form using Xamarin  and I wanted to remove the underline of the Entry controls. So I had to use a custom render to change the Entry Control .

Below Image describes what I was going to do…


So I wrote a custom render to customize the Entry Control in Android(Droid) project and when I was trying to run the app , It gave me an exception that..

Xamarin.Forms.Xaml.XamlParseException: Position 39:8.

Type local:NoBorderEntry not found in xmlns clr-namespace:LoginApp; assembly=LoginApp


How to Solve the issue ?

So I  looked for a solution and I found the issue is in the assembly name that I have defined in the XAML file.

What I had to do is change the assembly name.


Now I’ll describe you what was the wrong and How did I solve the issue..

First to learn How to write a custom render for Entry Control, Click here …

Here is the architecture of my app..


My code..

NoBorderEntry  Class

using Xamarin.Forms;

namespace LoginApp
public class NoBorderEntry : Entry


NoBorderEntryEntryRenderer Class

using Android.Graphics.Drawables;
using LoginApp;
using LoginApp.Droid;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;

[assembly: ExportRenderer(typeof(NoBorderEntry), typeof(NoBorderEntryEntryRenderer))]
namespace LoginApp.Droid
public class NoBorderEntryEntryRenderer : EntryRenderer
protected override void OnElementChanged(ElementChangedEventArgs&lt;Entry&gt; e)

if (Control != null)
Control.Background = new ColorDrawable(Android.Graphics.Color.Transparent);




The XAML code is too large in my file. SO I’ll write only the important parts of the XAML code..

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;ContentPage xmlns=""
x:Class="LoginApp.MainPage" &gt;

&lt;local:NoBorderEntry Grid.Row="0" &nbsp;Grid.Column="1" &nbsp;Placeholder="User Name" &nbsp;PlaceholderColor="Silver" TextColor="#D6FCE6" /&gt;


And here you can see the namespace that I have declared and how we can use it to the Entry render..


You can see the highlighted texts in above images and according to them the namespace in the NoBorderEntryRenderer is “LoginApp.Droid” but in the in the MainPage.Xaml file the assembly name id “LoginApp”.

So “assembly=LoginApp” should me changed to “assembly=LoginApp.Droid” and the Error will be fixed.


Then the correct XAML namespace declaration should be like below..

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns=";
x:Class="LoginApp.MainPage" >


Now the app will run without any error…




Thanks !

java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0 – How To Fix this Error ?

Why ?

When I was trying to compile one of my sample Xamarin Forms Android project, I got the below error …

java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0


Reason :

Then I looked for a solution and finally I found the reason is Android API 24 Requires Android JDK 8. But Still I had Android JDK 7 in my machine which came with Xamarin 4.2 with Visual Studio 2015.

Solution :

The solution was to download the Android JDK 8 and change the Android JDK path in Visual Studio to jdk 1.7 to jdk 1.8. It fixed the error and Finally my project built successfully.

Here Are Steps to Install the JDK 1.8 and how to fix the error..

  1. Go to Java SE Development Kit 8 Downloads and download the suitable file which is compatible with your OS. I have windows 10 x64 , So I downloaded the file for windows x64.


2. Then Install The java Development Kit 8..


3. Select the path to Install the JDK 1.8 and go through the setup wizard…


4. Then Close the setup when the installation has completed…


5. Open the Visual Studio 2015 and Then Go to Tools-> Options – > Xamarin -> Android Settings


6. Change the Java Development Kit Location to JDK 1.8 path  instead of JDK 1.7 path


7. Click OK when the JDK 1.8 Path selected…


8. Now Rebuild the Project and It will work fine… (Here is the built result in my project)


9. Now you can run the emulator to ensure that the project has build successfully…

(I’m using my Samsung galaxy J7 phone as the Emulator and it worked fine…)


The app opened in the phone successfully…




Thanks !

Multiple substitutions specified in non-positional format; did you mean to add the formatted=”false” attribute?


My Xamarin project uses multiple languages and their translations are stored in Resource/.resx files. When I build the project in VS 2015 the android project not built successfully and it gave me an error…


Multiple substitutions specified in non-positional format;
did you mean to add the formatted=”false” attribute?
Mobility_App.Droid F:\Mobility_App.Droid\Resources\Values-fr\AppResources.xml

1 error

Image 1 : Error


I search the error and I found the issue occurred because some <string> tags consists of percentage(%) symbol.

2 reason

Image 2 : Reason % symbol


To fix this error we have to add a attribute “Formatted” to <string> tags which are consists of ‘%’ symbols. and Set “Formatted” attribute’s value to “false”.

3 solution

Image 3 : add <string formatted=”false”>

Now the issue has fixed and to ensure, then rebuild the project and you can see the solution is success.

4 success

Image 4 : Successfully Build

Thanks you !