Reputation: 43
thes code in uwp
<StackLayout >
<local:page1 />
</StackLayout>
What is the equivalent code in xamarin.forms ? error
<?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="Haill_Xamarin.MainPage">
<ContentPage.Content>
<StackLayout>
<local:page1 /> // error this code in xamarin.forms
</StackLayout>
</ContentPage.Content>
</ContentPage>
Upvotes: 0
Views: 1540
Reputation: 2981
You should be declaring local at the top of your XAML file.
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Haill_Xamarin;assembly=Haill_Xamarin"
x:Class="Haill_Xamarin.MainPage">
<ContentPage.Content>
<StackLayout>
<local:page1 />
</StackLayout>
</ContentPage.Content>
</ContentPage>
Upvotes: 2