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

Invalid XAML error for DataTemplate after conversion

2 Answers 69 Views
Installer and Visual Studio Extensions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lance
Top achievements
Rank 2
Lance asked on 01 Aug 2014, 04:25 PM
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:
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"

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
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"

However, in many newer app templates, this is already used for the xmlns:phone declaration.. like this:
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"


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 Answers, 1 is accepted

Sort by
0
Harish
Top achievements
Rank 1
answered on 29 Aug 2016, 07:49 AM
still the error occurs.can u help on fixing this please
0
Lance | Manager Technical Support
Telerik team
answered on 29 Aug 2016, 08:13 PM
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.

Regards,
Lance | Tech Support Engineer, Sr.
Telerik
 

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.

 
Tags
Installer and Visual Studio Extensions
Asked by
Lance
Top achievements
Rank 2
Answers by
Harish
Top achievements
Rank 1
Lance | Manager Technical Support
Telerik team
Share this question
or