Getting Started With Infragistics Xamarin.Forms

Infragistics Videos / Thursday, April 2, 2015

Welcome to our new video tutorial for getting started with Infragistics Xamarin.Forms components! In this tutorial, I assume that you have set up your computer for working with Xamarin.Forms (including android, iOS, and WinPhone platforms).

You have created a new blank app project in Visual Studio (using Xamarin.Forms portable template)  And your application should be targeting Xamarin.Forms v1.3.5.6335 or later.

After creating new blank project, you're going to have 4 projects: one for Android, one for iOS, one for Windows phone, and one cross platform project.

Adding References to Infragistics Xamarin.Forms Assemblies:

Note that all platform specific Infragistics assemblies have name of a platform that they are intended for and Infragistics cross-platform assemblies do not have name of a platform because they are used by all platforms.

We will need to manually add references to Infragistics cross-platform assemblies in all projects by right clicking a project, selecting Add References menu item, then clicking Browse button and navigating to a folder and selecting Infragistics cross platform assemblies. We need to repeat this step for all projects in the solution.
(REFERENCE FOR ADAM)

  • InfragisticsXF.Controls.Barcodes.dll
  • InfragisticsXF.Controls.Charts.dll
  • InfragisticsXF.Controls.Gauges.dll
  • InfragisticsXF.Controls.Grids.dll
  • InfragisticsXF.dll

 

Next, we need to add references to Infragistics Android assemblies In the Application .Droid project by right clicking the .Android project, selecting Add References menu item, then clicking Browse button and navigating to a folder and selecting Infragistics Android assemblies:

  • InfragisticsXF.Android.dll
  • InfragisticsXF.Controls.Barcodes.Android.dll
  • InfragisticsXF.Controls.Charts.Android.dll
  • InfragisticsXF.Controls.Gauges.Android.dll
  • InfragisticsXF.Controls.Grids.Android.dll
  • InfragisticsAndroidBindings.dll

 

Similarly, we need to add references to Infragistics iOS assemblies In the Application .iOS project by right clicking the .iOS project, selecting Add References menu item, then clicking Browse button and navigating to a folder and selecting the Infragistics iOS assemblies:

  • InfragisticsXF.Controls.Barcodes.iOS.dll
  • InfragisticsXF.Controls.Charts.iOS.dll
  • InfragisticsXF.Controls.Gauges.iOS.dll
  • InfragisticsXF.Controls.Grids.iOS.dll
  • InfragisticsXF.iOS.dll
  • IG.Unified.dll
  • IGChart.Unified.dll

 

Finally for Windows Phone project, we need to add references to Infragistics Windows Phone assemblies by right clicking the Windows Phone project, selecting Add References menu item, then clicking Browse button and navigating to a folder and selecting the Infragistics Windows Phone assemblie

  • InfragisticsXF.Controls.Barcodes.WP.dll
  • InfragisticsXF.Controls.Charts.WP.dll
  • InfragisticsXF.Controls.Gauges.WP.dll
  • InfragisticsXF.Controls.Grids.WP.dll
  • InfragisticsXF.WP.dll
  • InfragisticsWP8.Controls.Barcodes.v15.1.dll
  • InfragisticsWP8.Controls.Charts.XamDataChart.v15.1.dll
  • InfragisticsWP8.Controls.Gauges.v15.1.dll
  • InfragisticsWP8.Controls.Interactions.XamInfoBox.v15.1.dll
  • InfragisticsWP8.Controls.Interactions.XamWindow.v15.1.dll
  • InfragisticsWP8.DataVisualization.v15.1.dll
  • InfragisticsWP8.v15.1.dll
  • Infragistics.Controls.Grid.WP8.dll
  • Infragistics.Controls.Grid.WP8Core.v15.1.dll

At this point, you should have Infragistics Xamarin.Forms assemblies added and now we need to initialize Infragistics components in all application projects so that they are deployed to a device with your application.

First for Android we open main activity.cs , and right before load application, we add 4 lines of code to initialize the Infragistics components. Then we need to repeat this step for the iOS project  in the app, and you get that CS file  then For the Windows phone project we need to do the same thing. In the main page, that's our CS phone. Then save.

Next, we need to add a new Xamarin.Forms XAML Page and set it as the main page the portable project.

Therefore, we right click on the project, selecting Add – New Item… - and selecting Xamarin.Forms XAML Page template. We change name to GaugePage or other name you like use. Then we need to change the MainPage property of the Appilcation in the App.cs file to the newly created GaugePage.

On the XAML page, we need to add Infragistics namespace declarations for charts, barcodes, gauge, and grids. Note that you need to add namespace declarations only for Infragistics that you are planning to use in your application. However, I will add all namespaces so you know how it is done:

xmlns:igGauges="clr-namespace:Infragistics.XF.Controls;assembly=InfragisticsXF.Controls.Gauges"

xmlns:igCharts="clr-namespace:Infragistics.XF.Controls;assembly=InfragisticsXF.Controls.Charts"

xmlns:igCodes="clr-namespace:Infragistics.XF.Controls;assembly=InfragisticsXF.Controls.Barcodes"

xmlns:igGrids="clr-namespace:Infragistics.XF.Controls;assembly=InfragisticsXF.Controls.Grids"

Finally, we need to add Infragistics control the XAML page. I am going to add Infragistics Radial Gauge such that content of this page is Radial Gauge with a needle pointing at a value of 50.

For simplicity reasons, I am going to build and run only the .WinPhone application. Therefore, I am unloading Android and iOS projects and Windows Phone should be my startup project as indicated by bolded name of the project. At this point, we are ready to run this application against  a Windows Phone emulator so I click Run button and WinPhone emulator will load the application in a few seconds.

And here we have Infragistics Radial Gauge with a needle pointing at a value of 50.

Be sure to download the source code to this sample here to create your own Infragistics charts, grids, bar codes and other gauges, and thank you for watching this video tutorial for getting started with Infragistics Xamarin.Forms components!