When creating a new xaml page via Template Studio the intellisense stops working. This seems to be intermittent but it is something that has frequently arisen.
But I've found a solution! I eventually noticed that the line:
?xml version="1.0" encoding="utf-8"? (in angle brackets, had to remove them for this comment)
is not being written at the very top of the file. Once this is manually added everything works as normal. I've lost several hours over this issue cumulatively so I just wanted to document it for others to find, and also to draw it to the attention of the development team (maybe I have configured something incorrectly though?).
To Reproduce
Simply create a new WinUI page via the Template Studio.
Then try writing the text for a new Button. Ideally you will see Intellisense pop up with the combobox selected at the Button entry. If intellisense is not working then the menu will simply consist of:
!--
![CDATA[
?
Additional features like the auto-generation of a Click handler also doesn't work. References to named controls within the cs code will contain the red squiggles denoting the reference does not exist, although it does compile and work OK if the xaml and cs manage to reference each other successfully.
Describe the bug
When creating a new xaml page via Template Studio the intellisense stops working. This seems to be intermittent but it is something that has frequently arisen.
But I've found a solution! I eventually noticed that the line:
?xml version="1.0" encoding="utf-8"? (in angle brackets, had to remove them for this comment)
is not being written at the very top of the file. Once this is manually added everything works as normal. I've lost several hours over this issue cumulatively so I just wanted to document it for others to find, and also to draw it to the attention of the development team (maybe I have configured something incorrectly though?).
To Reproduce
Simply create a new WinUI page via the Template Studio.
Then try writing the text for a new Button. Ideally you will see Intellisense pop up with the combobox selected at the Button entry. If intellisense is not working then the menu will simply consist of:
!-- ![CDATA[ ?
Additional features like the auto-generation of a Click handler also doesn't work. References to named controls within the cs code will contain the red squiggles denoting the reference does not exist, although it does compile and work OK if the xaml and cs manage to reference each other successfully.
Additional context
No response
Applies to the following platforms:
About your setup