This is a migrated thread and some comments may be shown as answers.

Telerik Ui Controls causing exception

3 Answers 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
tyler
Top achievements
Rank 1
tyler asked on 25 Feb 2018, 04:56 AM

Hello i seem to have ran in to another problem,whenever i put a telerik control into xaml code i can get the code to compile but get a runtime error of XamlParseException at the LoadFromXaml function call.All telerik libraries are referenced,what could it be?Thanks

[global::Xamarin.Forms.Xaml.XamlFilePathAttribute("C:\\Users\\ty\\Source\\repos\\TelerikXamarinApp2\\TelerikXamarinApp2\\Portable\\StartPage" +
       ".xaml")]
   public partial class StartPage : global::Xamarin.Forms.ContentPage {
        
       [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
       private void InitializeComponent() {
           global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(StartPage));
       }
   }
Unhandled Exception:
 
Xamarin.Forms.Xaml.XamlParseException: <Timeout exceeded getting exception details> occurred

3 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 26 Feb 2018, 04:40 PM
Hello Tyler,

The timeout is unrelated to the controls, but the XamlParseException is mostly likely because you forgot to enable XAML Compilation (aka XamlC) or give custom controls an x:Name (see this section in the Troubleshooting article).

This is a known limitation of Xamarin.Forms on iOS when the custom controls are in an external library, not just Telerik controls. The iOS linker will optimize out any code that isn't referenced.

The fix is simple give each control an x:Name (this is rather inconvenient), or enable XamlC on the entire project so that all XAML-instantiated controls are included.

using Xamarin.Forms.Xaml;
 
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace YourProjectNamsepace
{
    public partial class App
    {
        public App()
        {
            InitializeComponent();
        }
    }
}


If you have any further trouble, please open a support ticket here and attach your code so that we can investigate further.

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
tyler
Top achievements
Rank 1
answered on 26 Feb 2018, 09:51 PM
perfect that did the trick,and will use the support ticket system if i need anything else.Thank You
0
Taras
Top achievements
Rank 1
answered on 06 Jun 2018, 12:08 PM
Thanks, it saved me the whole day.
Tags
General Discussions
Asked by
tyler
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
tyler
Top achievements
Rank 1
Taras
Top achievements
Rank 1
Share this question
or