Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Proper syntax highlighting in XAML editor when inhereting from custom page

$
0
0

We created a custom ViewPage class to handle some page setup and dependency solving, which all pages inherit from. The issue is that XAML syntax is highlighted only on the environment that file was created. Opening that file in another environment just shows the standard XML editor (hence no XAML highlighting). This does not happen when inheriting from standard classes like ContentPage.

The funny part is that, if I edit the file removing the namespace declaration from the root element (leaving just "<ViewPage", even if it is invalid), I save and close it, and then reopen it, then I get proper XAML syntax highlight, even after closing VS. I have deleted the .suo file from my solution, and noticed that all my XAML files that inherit from ViewPage are again with no XAML syntax highlight.

Is there a way to achieve this without relying on the .suo file, or make VS use the XAML syntax highlight in these files by default?


Viewing all articles
Browse latest Browse all 91519

Trending Articles