Q:

The Type "name" was not found - Xamarin

I am trying to implemenat a TabbedPage with Xamarin Forms. It is very similar to TabbedPage and Content pages are not showing
However I have a quick question as to how to include other xaml files from the MainPage.xam:
Here is my code:
MainPage:
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Assignment"
        x:Class="Assignment.MainPage">
<TabbedPage.Children>

    <local:Alarm /> "The type 'local:Alarm' was not found. Verify that you are not missing..."

</TabbedPage.Children>

The above error is the only build error.
Alarm.xaml:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="Assignment.Droid.Resources.layout.Alarm">
<ContentPage.Content>
    <StackLayout>
        <Label Text="Welcome to Xamarin.Forms!"
            VerticalOptions="CenterAndExpand" 
            HorizontalOptions="CenterAndExpand" />
    </StackLayout>
</ContentPage.Content>
</ContentPage>

Here is my project structure:

On the other link, I saw that he put his xaml files in the layout folder. 
Is this the correct setup? I think I have missed something simple.

A:

As Greggz mentions: move it to your shared project.
Then you will have to change your namespaces because that is what actually matters. In .NET land, it is customary that your namespace equals the path on your filesystem.
In you Alarm.xaml, change this line: x:Class="Assignment.Droid.Resources.layout.Alarm" to x:Class="Assignment.Alarm".
Then go into your code-behind, the Alarm.xaml.cs file and change the namespace there too. So change namespace Assignment.Droid.Resources.layout to namespace Assignment.
Since the XAML and the code-behind are implemented as a partial class, this needs to be in sync.

