ComponentOne Xamarin Edition
Adding NuGet Packages to your App
Getting Started with Xamarin Edition > Adding NuGet Packages to your App

To add Xamarin References to your App

In order to use Xamarin controls on the three platforms: Android, iOS and UWP, Xamarin references have to be added to all three projects for each of these platforms. Complete the following steps to add Xamarin references to your project.

  1. Open a pre-existing Cross Platform App or create a new Cross Platform App.For more information, see Creating a New Xamarin.Forms App.
  2. From the Project menu, select Manage NuGet Packages. The NuGet Package Manager appears.
  3. Select GrapeCity from the Package source drop down.
  4. Click Browse tab and select C1.Xamarin.Forms.ControlName (for example C1.Xamarin.Forms.FlexChart) from the left pane.
  5. In the right pane, click Install. This adds the references for the Xamarin control.
  6. In the Preview dialog, click OK to proceed with the changes.
  7. Click I Accept to accept the license terms. The license gets installed.
  1. Open a pre-existing Mobile App or create a new Mobile App (see Creating a New Xamarin.Forms App).
  2. In the Solution Explorer, right click the project and select Add | Add Packages. The Add Packages dialog appears.
  3. From the drop down menu in the top left corner, select GrapeCity. The available Xamarin packages are displayed.
  4. Select the package C1.Xamarin.Forms.ControlName and click the Add Package button. This adds the references for the Xamarin control.

To manually create a Xamarin Feed Source

Complete the following steps to manually add Xamarin NuGet feed URL to your NuGet settings in Visual Studio or Visual Studio for MAC and install Xamarin.

  1. From the Tools menu, select NuGet Package Manager | Package Manager Settings. The Options dialog box appears.
  2. In the left pane, select Package Sources.
  3. Click the Add button in top right corner. A new source is added under Available package sources.
  4. Set the Name of the new package source. Set the Source as http://nuget.grapecity.com/nuget/.
  5. Click OK. The feed has now been added as another NuGet feed source.

To install Xamarin using the new feed:

  1. Open a pre-existing Mobile App or create a new Mobile App (see Creating a New Xamarin.Forms App).
  2. Select Project | Manage NuGet Packages. The Manage NuGet Packages dialog box appears.
  3. Select the newly created package source and click the Browse tab. The available packages are displayed in the left pane where you can search for the control using the Search box.
  4. In the right pane, click Install. This updates the references for the Xamarin control.
  5. In the Preview dialog, click OK to proceed with the changes.
  6. Click I Accept to accept the ComponentOne license for Xamarin and then click Close in the Manage NuGet Packages dialog box.
  1. From the Projects menu, select Add NuGet Packages. The Add Packages dialog appears.
  2. From the drop down menu on the top left corner, select Configure Sources. The Preferences dialog appears.
  3. In the left pane, expand Packages and select Sources.
  4. Click the Add button. The Add Package Source dialog appears.
  5. Set the Name of the new package source. Set the URL as http://nuget.grapecity.com/nuget/.
  6. Click the Add Source button. The Xamarin feed has now been added as another NuGet feed source.
  7. Click OK to close the Preferences dialog.

To install Xamarin using the new feed:

  1. Open a pre-existing Mobile App or create a new Mobile App (see Creating a New Xamarin.Forms App).
  2. In the Solution Explorer, right click the project and select Add | Add Packages. The Add Packages dialog appears.
  3. From the drop down menu on the top left corner, select GrapeCity. The available Xamarin packages are displayed.
  4. Select the package C1.[Platform].[ControlName] and click the Add Package button. This adds the references for the Xamarin control.