The name 'InitializeComponent' does not exist in the current context when creating new xaml file
<p>I have searched for an answer to this question for a while so I hope that my instance can be solved. I created a new Xamarin.Forms shared projects in visual studio 2015 community. I created a new xaml file and name it <b>LoginPage</b> and placed it in a folder named Pages in the shared app project. After adding the Xamarin.Forms namespace for it to recognize <b>Page</b> and removing <b>this.</b> before <b>InitializeComponent</b> I have this:</p>

<pre><code>using Xamarin.Forms;

namespace BeneFit.Pages
{

    public sealed partial class LoginPage : Page
    {
        public LoginPage()
        {
        InitializeComponent(); //This has the red squiggly
        }
    }
}
</code></pre>

<p>The Xaml file here has not been changed at all:</p>

<pre><code>&lt;Page
    x:Class="BeneFit.Pages.LoginPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BeneFit.Pages"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"&gt;

    &lt;Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"&gt;

    &lt;/Grid&gt;
&lt;/Page&gt;
</code></pre>

<p>One thing I have notice a lot is that the build action needs to be <b>Page</b> which I made sure of in this case. Also the suggested quick fix was to add this:</p>

<pre><code>    private void InitializeComponent()
    {
        throw new NotImplementedException();
    }
</code></pre>

<p>which doesnt really solve the issue because I know I should have to do it. Any help or suggestions would be huge, ive been trying to deal with this for a while.</p>