New to Telerik UI for Xamarin? Download free 30-day trial

DatePicker border is not visible when the app is built on UWP release mode

Environment

Product Version 2020.3.1022.1
Product DatePicker for Xamarin

Description

The following article will show you how to visualize the Border that wrapps around the Date Picker control. When the app is built for UWP in Release Mode the border is not visible. The reason behind this is that the .NET Native Toolchain strips the assemblies needed for visualizing the RadBorder control.

Solution

Make sure that the Telerik renderers are not stripped out by the UWP .NETNative compilation step. Add the following code inside the App.xaml.cs file of the UWP Project:

var assembliesToInclude = new List<Assembly>
{
    typeof(Telerik.XamarinForms.Primitives.RadBorder).GetTypeInfo().Assembly,
    typeof(Telerik.XamarinForms.PrimitivesRenderer.UWP.BorderRenderer).GetTypeInfo().Assembly,
};

Xamarin.Forms.Forms.Init(e, assembliesToInclude);
In this article