The C1Studio Xamarin Edition includes Xuni controls. In this blog post I’ll walk you through getting started using Xuni and Xamarin, from downloading to building an Android, iOS or cross-platform Xamarin.Forms app.
Xuni is distributed as NuGet packages for use with the Xamarin Platform. You must download and install Xuni with C1Studio at least once to not only get the latest packages, but to install the GrapeCity NuGet feed. Once you've installed Xuni, you can proceed to use the packages in one of two ways:
In part 4, we'll look at how to work with the GrapeCity NuGet feed.
As you continue working with Xuni's Xamarin controls beyond this tutorial, you'll undoubtedly need to check the documentation at some point. So it's good to know exactly where to look since we provide three different versions of the documentation: Xamarin.Forms, Android and iOS.
Keep in mind the Xuni documentation also includes code for Objective-C, Swift and Java, which you won't need to use in any Xamarin app. We provide C# code snippets alongside the Java, Swift or Objective-C code in the Android and iOS documentation.
If you're evaluating Xamarin Edition for the first time, the simplest and quickest way to test the controls on your personal device or emulator is to run the samples. When you install Xuni, the samples get installed at \Documents\Xuni\Xamarin\Samples\. Or, if you prefer, you can download the latest samples individually from GoXuni on GitHub. You can also just view the code on GitHub without having to download anything. At either location, we have several sample projects: one for each major control. They work in Xamarin Studio and Visual Studio. So long as you didn't remove the GrapeCity NuGet feed, you should be able to just open, build and run these projects. Your IDE will first automatically download the packages. Then you can dig into the code and play with the controls to see how they work. Xuni controls do require a runtime license key, which our samples have included. I'll cover more on licensing in part 4. There's also the Xuni Explorer demo app, which you can install from the app marketplace. This is helpful to quickly browse the capabilities, but it doesn't show the code. So now you can easily run our samples, but eventually you'll want to test the Xuni control in your app with your data. That's next.
For this part, I've created three videos one for each Xamarin Platform. These videos walk you through:
Getting Started with Xuni and Xamarin.iOS.
Getting Started with Xuni and Xamarin.Android
Getting Started with Xuni and Xamarin.Forms.
Licensing is a required step to evaluate or use Xuni's Xamarin controls within your own app. The Xuni controls contain runtime license validation per app. As I mentioned above, the samples already have a license key unique to that sample so they run "out of the box." You can generate runtime keys on componentone.com or goxuni.com. To generate a runtime key for your app:
The videos in part 4 also cover licensing from www.goxuni.com. 6. Take this key and copy it into your project. The simplest way to do this is to create a new class, named License.cs. The outputted text from the website includes the static class declaration so it’s very easy to just paste this into your editor. 7. Finally, in your code, before you initialize the Xuni control, set the Xuni.Core.LicenseManager.Key property to your key.
Xuni.Core.LicenseManager.Key = License.Key;
Now you should be up and running with Xuni in your Xamarin app! When you purchase Xuni, you'll get a serial number. Register that serial number at My Licenses, and when you generate new app keys, you'll be able to select your serial number rather than selecting Evaluation. For full steps on licensing, check out the documentation. Thanks for reading and thanks for evaluating C1Studio Xamarin Edition!