Skip to main content Skip to footer

A Look at the New Samples in ComponentOne Studio for Xamarin control suite

We’ve added new samples to the 2017v3 release to show off some of the new features available in ComponentOne Studio for Xamarin. These samples highlight some common use cases for our controls such as interacting with data from the web and using a local database. In this blog we’ll highlight what’s new in these samples, and why you should check each one out.

SQLiteDataBase Xamarin App Sample

This sample demonstrates how you can use a local SQLite database along with the FlexGrid to edit, sort, and filter records. Additionally, it takes advantage of the CollectionView’s built-in support for incremental loading and pull-to-refresh. These features allow the user to both gradually load records on demand and refresh the data in the FlexGrid at any time by swiping down from the top of the grid. The FlexGrid also allows you to append records to the local database using the add new row functionality:

SQLLiteDataBase Xamarin App Sample

Most of the work in this sample is accomplished in the SQLiteCollectionView class which enables CRUD operations with the database, filtering and sorting of records, and on demand loading. The SQLiteCollectionView class is an implementation of the C1CursorCollectionView, and further implements the ISupportSorting, ISupportFiltering, and ISupportEditing interfaces for interacting with the database. By using this modified CollectionView you can use minimal code to bind your FlexGrid to your data:

flexgrid.ItemsSource = new SQLiteCollectionView<Person>(connection);

You can check more out on our GitHub: https://github.com/GoXuni/C1-Studio-for-Xamarin/tree/master/XF/SQLiteDataBase

Why check out this sample?

It shows you how you can use FlexGrid for CRUD operations with a SQLite DB in Xamarin.Forms, and demonstrates some advanced CollectionView functionality for pull-to-refresh and on demand loading.

C1Weather Xamarin Sample

The C1Weather sample is an updated version of an old weather app which we’ve used as an example in the past (/en/blogs/how-to-create-a-simple-xamarin-forms-weather-application-using-xuni) that uses our CollectionView, FlexChart, and FlexGrid along with the OpenWeatherMap API (http://openweathermap.org/) to pull weather data for a 5 day forecast into your app. In addition to the OpenWeatherMap API, the sample uses Json.NET to help parse the weather response data. The sample also shows off numerous FlexChart and FlexGrid features including multiple axes, linemarkers, custom image cells, custom styling, and custom selection (where row selection in the FlexGrid influences the data presented in the FlexChart).

It’s also generally a helpful reference for how you can use our controls with asynchronous web data.

Xamarin Weather App

You can check more out on our GitHub: https://github.com/GoXuni/C1-Studio-for-Xamarin/tree/master/XF/C1Weather

Why check out this sample?

It demonstrates a common scenario of working with json data from a webservice in your Xamarin.Forms app and visualizing that data with FlexGrid and FlexChart. In addition, the sample involves some advanced customizations of both the FlexChart and the FlexGrid in terms of styling and interaction between the two controls.

Xamarin Sunburst Chart: Periodic Table Sample

Added as a part of Sunburst101, the Periodic Table sample is an impressive data visualization periodic table of chemical elements that groups the data into different classifications. These classifications show a clear hierarchy, which is the perfect instance to use a Sunburst chart. We’ve talked at length about the sample in the past ("Redesign the Periodic Table as a .NET Sunburst Chart"), but most significantly, this example shows you how to build your grouped business objects from XML data and connect it to a Sunburst FlexChart control. The inner “donut hole” of the Sunburst chart is customized to display a dynamic list of information about the current selected item in the chart.

Xamarin Sunburst Chart - Periodic Table

You can check more out on our GitHub: https://github.com/GoXuni/C1-Studio-for-Xamarin/tree/master/XF/Sunburst101

Why check out this sample?

It demonstrates an interesting way to visualize hierarchical data with the Sunburst chart. Also, it handles deserializing xml data and transferring the data into a structured model of .NET objects.

Try ComponentOne Studio for Xamarin

Kelley Ricker

comments powered by Disqus