VS Dev Essentials includes Syncfusion Xamarin & UWP | Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (172).NET Core  (29).NET MAUI  (192)Angular  (107)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (209)BoldSign  (12)DocIO  (24)Essential JS 2  (106)Essential Studio  (200)File Formats  (63)Flutter  (131)JavaScript  (219)Microsoft  (118)PDF  (80)Python  (1)React  (98)Streamlit  (1)Succinctly series  (131)Syncfusion  (882)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (49)Windows Forms  (61)WinUI  (68)WPF  (157)Xamarin  (161)XlsIO  (35)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (146)Chart  (125)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (62)Development  (613)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (37)Extensions  (22)File Manager  (6)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (488)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (41)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (368)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (30)Visual Studio Code  (17)Web  (577)What's new  (313)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

VS Dev Essentials Program Includes Syncfusion’s Xamarin & UWP

Today we’re pleased to announce that the Visual Studio Dev Essentials program benefits now include free access to over 80 components and frameworks from Syncfusion’s component suite for building Xamarin and UWP applications.

The Xamarin and UWP component suites from Syncfusion include all the common user interface controls needed for building line-of-business applications such as grids, charts, gauges, maps, calendars, treemaps, schedulers, and editors. The suites also include full-fledged libraries for reading and writing Microsoft Excel, Microsoft Word, Adobe PDF, and Microsoft PowerPoint files. The Xamarin suite provides components for all flavors of Xamarin, including Xamarin.iOS, Xamarin.Android, and Xamarin.Forms platforms. The Xamarin and UWP suite of components can be used together to build powerful line-of-business applications that target all the major platforms, including Windows 10, iOS, and Android.

All the available components are feature-rich and easy to use. There is also extensive documentation available to help integrate the components into your application within a few minutes. To demonstrate this, let us walk through the process of including charts and Excel reporting in an existing Xamarin application.

Adding charting capabilities

Step 1 : Install the required Chart NuGet packages as demonstrated here .

Step 2: Define a data model that represents a data point in SfChart.

public class Model   
{
       
public string Name { get; set; }
 
       
public double Height { get; set; }

}
Step 3: Populate the view model with data using the previous model as shown next.
public class ViewModel   
{
       
public List<Model> Data { get; set; }
 
       
public ViewModel()       
{
            Data = new List<Model>()
            {
                new Model { Name = "David", Height = 180 },
                new Model { Name = "Michael", Height = 170 },
                new Model { Name = "Steve", Height = 160 },
                new Model { Name = "Joel", Height = 182 }
            };
       
}
}
Step 4: Now add the namespace of SfChart and ViewModel to your XAML page, and then set the BindingContext with the instance of ViewModel.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage >="http://xamarin.com/schemas/2014/forms"
             >="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="ChartDemo.MainPage"
             >="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
             >="clr-namespace: ChartDemo">
 
   
<ContentPage.BindingContext>
       
<local:ViewModel></local:ViewModel>
   
</ContentPage.BindingContext>
 
</ContentPage>
Step 5: Initialize the SfChart and then add ColumnSeries, as we are going to visualize the comparison of heights here. Next, bind the Data property of the above ViewModel to the ColumnSeries.ItemsSource property.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage >="http://xamarin.com/schemas/2014/forms"
             >="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="ChartDemo.MainPage"
             >="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
             >="clr-namespace: ChartDemo">
 
   
<ContentPage.BindingContext>
       
<local:ViewModel></local:ViewModel>
   
</ContentPage.BindingContext>
  
 
<chart:SfChart>
   
<chart:SfChart.PrimaryAxis>
     
<chart:CategoryAxis></chart:CategoryAxis>
   
</chart:SfChart.PrimaryAxis>
  
   
<chart:SfChart.SecondaryAxis>
       
<chart:NumericalAxis>
            <chart:NumericalAxis.Title>
               <chart:ChartAxisTitle Text="Height (in cm)"></chart:ChartAxisTitle>
            </chart:NumericalAxis.Title>      
       
</chart:NumericalAxis>   
  
</chart:SfChart.SecondaryAxis>
  
   
<chart:SfChart.Series>
       
<chart:ColumnSeries ItemsSource="{Binding Data}" XBindingPath="Name"      
YBindingPath="Height"></chart:ColumnSeries>
   
</chart:SfChart.Series>
 
</chart:SfChart>
 
</ContentPage>
The following code initializes the SfChart component.
SfChart chart = new SfChart
            {
                PrimaryAxis = new CategoryAxis(),
                SecondaryAxis = new NumericalAxis()
            };
 
            chart.SecondaryAxis.Title = new ChartAxisTitle
            {
                Text = "Height (in cm)"
            };
 
            ColumnSeries columneSeries = new ColumnSeries();
 
            columneSeries.ItemsSource = new List<Model>()
            {
                new Model { Name = "David", Height = 180 },
                new Model { Name = "Michael", Height = 170 },
                new Model { Name = "Steve", Height = 160 },
                new Model { Name = "Joel", Height = 182 }
            };
 
            columneSeries.XBindingPath = "Name";
          
 columneSeries.YBindingPath = "Height";
 
           
chart.Series.Add(columneSeries);
The final output shown below will be identical on iOS, Android, and Windows platforms.

Adding Excel reporting capabilities

Step 1 : Install the required XlsIO NuGet packages as demonstrated here .

Step 2: Read and write Excel files as shown in the following sample.

//Create an instance of ExcelEngine.
using (ExcelEngine excelEngine = new ExcelEngine())
{
         //Set the default application version as Excel 2013.            
         excelEngine.Excel.DefaultVersion = ExcelVersion.Excel2013;
         //Open an existing workbook.
         IWorkbook workbook = excelEngine.Excel.Workbooks.Open(inputExcelStream);
         //Access first worksheet from the workbook instance.
         IWorksheet worksheet = workbook.Worksheets[0];
         //Set the text value to the cell
         worksheet["N1"].Text = "Total";
         worksheet["A6"].Text = "Average";
 
         //Set the formulas to the cell or range of cells
         worksheet["N2:N5"].FormulaR1C1 = "SUM(RC[-12]:RC[-1])";
         worksheet["B6:M6"].FormulaR1C1 = "AVERAGE(R[-4]C:R[-1]C)";
         worksheet["N6"].Formula = "SUM(B2:M5)";
 
         //Set the column width in points.
         worksheet["A1:N1"].ColumnWidth = 10;
 
         //Save the workbook to stream in xlsx format.
         workbook.SaveAs(outputExcelStream);
}
As demonstrated in the above cases, it only takes a few minutes to add powerful enhancements to your existing applications. Get started today and transform your application by claiming your free license.

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed
Scroll To Top