Telerik Ui Controls causing exception

4 posts, 0 answers
  1. tyler
    tyler avatar
    4 posts
    Member since:
    Feb 2018

    Posted 24 Feb Link to this post

    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
  2. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    755 posts

    Posted 26 Feb Link to this post

    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
  3. tyler
    tyler avatar
    4 posts
    Member since:
    Feb 2018

    Posted 26 Feb in reply to Lance | Tech Support Engineer, Sr. Link to this post

    perfect that did the trick,and will use the support ticket system if i need anything else.Thank You
  4. Taras
    Taras avatar
    1 posts
    Member since:
    Jun 2018

    Posted 06 Jun in reply to Lance | Tech Support Engineer, Sr. Link to this post

    Thanks, it saved me the whole day.
Back to Top