Using FlexCel with Windows Phone, Store and Universal
There are currently two ways to use FlexCel with Universal apps:
- Using the nuget package or the library at lib\uwp10. This requires Windows 10, and doesn't suport the Universal style in windows 8.
- Using .NET Core.
Same as with iOS and Android, the code needed to use FlexCel in Windows Phone or Universal Windows Platform (UWP) apps is very similar to the code needed to use FlexCel in Desktop .NET.
1. FlexCel for UWP 10
FlexCel for UWP 10 requires Windows 10 and won't run in Windows 8.1.
There isn't much to add about FlexCel for UWP 10. It works the same as always and you can reuse the code you wrote for other platforms.
2. FlexCel for .NET Core
.NET Core is another platform which is positioning itself as a better option for cross-platform development. The main advantage (and disadvantage) of using FlexCel for .NET core over FlexCel for UWP is that FlexCel for .NET Core uses the SKIA library for graphics instead of the built-in graphics. This is an advantage because SKIA is more complete than the native graphics available in UWP, and it is a disadvantage because you need to ship SKIA together with your app, and this will add tens of megabytes to the distribution.
About the Assembly to reference
The assemblies you need to reference are available in different places depending on which platform you choose to use:
- FlexCel for UWP 10 is available in the folder lib\uwp10, or available in the FlexCel NuGet package.
- FlexCel for .NET Core only available in the FlexCel NuGet package.
Depending on the exact platform you are using, you might get an error of missing encoding when calling FlexCel.
With the FlexCel NuGet package encodings are automatically added through NuGet, so you should see no issues.
If you are manually referencing the portable dll you should do the following to avoid Encoding issues:
- Add a reference to the System.Text.Encoding.CodePages NuGet package in your app at: https://www.nuget.org/packages/System.Text.Encoding.CodePages/
- Somewhere in the initialization of your app, register the encodings by calling: