Type not found Exception

 

In some cases you might come across such exception that concerns a specific control from the Telerik UI for Xamarin suite. For example, the following exception might be thrown if you add a Gauge control in your XAML without setting its x:Name attribute:

Type telerikGauges:RadRadialGauge not found in xmlns:clr-namespace:Telerik.XamarinForms.DataVisualization.Gauges;assembly=Telerik.XamarinForms.DataVisualization

There are a couple of approaches you can take in order to resolve the issue:

Add XamlCompilation attribute for the portable assembly

The following snippet shows how to add the XamlCompilation attribute in the page code-behind:

using Xamarin.Forms.Xaml;

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace SDKBrowser.Examples.CalendarControl.GettingStartedCategory.GettingStartedExample
{
    public partial class CalendarGettingStartedXaml : ContentView
    {
        public CalendarGettingStartedXaml()
        {
            this.InitializeComponent();
        }
    }
}

Add x:Name for the control

Simply add an x:Name for the control, no matter what type it is. The example shows how to do it for a RadCalendar:

<telerikInput:RadCalendar x:Name="calendar"/>
In this article
Not finding the help you need? Improve this article