Forms Xaml Page is missing in Visual Studio 2017 Xamarin

All tutorials and web pages talk about using Project | Add a new item and add a new "Forms Xaml" page. But whenever I install Xamarin and Visual Studio 2015, I just get "Forms ContentPage" and "Forms ContentView" which just generate the C # file, not the Xaml.

I tried this one and it didn't work.

And I also tried reinstalling Visual Studio. Does anyone know what to do?

The real problem is I want to save the Xaml along with the code file like <W640 "

+3


source to share


2 answers


I just did a clean install of Visual Studio 2017 and the "Forms Content Page Xaml" appeared in the Add New Item dialog. What items did you choose when installing the Xamarin Visual Studio Package? Compare with the ones I chose. Maybe something was not filmed?

Also, if you want to save the Xaml file along with the file found in the code, do so by editing YourProjectName.projitems inside your project folder. To find it, right-click the main project and open its folder in Windows Explorer, then use the file editor to edit the .projitems file . Find the Compile tag for .cs files and add the DependentUpon tag to it , as in the example below:



<Compile Include="$(MSBuildThisFileDirectory)YourFile.xaml.cs">
  <DependentUpon>YourFile.xaml</DependentUpon>
</Compile>

      

After that, unload and reload the project. Unfortunately I had to follow this procedure to all the new Xaml files I created in my projects.

+1


source


I think you can use the content page, it has a .xaml extension and comes with the code behind. They just change the name of the template.



0


source







All Articles