Invalid XAML error for DataTemplate after conversion

Thread is closed for posting
3 posts, 1 answers
  1. Answer
    Lance avatar
    15 posts
    Member since:
    May 2012

    Posted 01 Aug 2014 Link to this post

    Hi everyone,

    If you are getting an "Invalid XAML" error in the Visual Studio designer after doing the "Convert to Telerik Application". This is usually caused by an old Windows Phone Controls namespace on the page (see the attached screenshot).

    Look up to your xmlns declarations and find this one:

    This is a relic from the Windows Phone 7 when you needed to use a Pivot or Panorama control. It is also the cause of your Invalid XAML error.

    The proper namespace is now

    However, in many newer app templates, this is already used for the xmlns:phone declaration.. like this:

    If you have the xmlns:phone declaraiton, simply delete the bad line xmlns:controls line. If you do not, then just change the assembly name from Microsoft.Phone.Controls to Microsoft.Phone and rebuild.

    Everything should work now, happy coding!

  2. Harish
    Harish avatar
    1 posts
    Member since:
    Aug 2016

    Posted 29 Aug 2016 in reply to Lance Link to this post

    still the error occurs.can u help on fixing this please
  3. Lance | Tech Support Engineer, Sr.
    Lance | Tech Support Engineer, Sr. avatar
    605 posts

    Posted 29 Aug 2016 Link to this post

    Hi Harish,

    This isn't something Telerik can change as the namespace for the controls belongs to Microsoft and it is not recommended that we change any of your existing xmlns declarations.

    If you need help fixing yours, please reply with the full XAML of the page where you're having a problem.

    Lance | Tech Support Engineer, Sr.

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top