Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property Content is null or is not IEnumerable

I have a test page in Xamarin.Forms and it gets me this error, how can I fix this ?

Property Content is null or is not IEnumerable

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="Project1.Page1">
<ContentPage.Content>
    <Label Text="Page"></Label>
    <Editor Text="I am an Editor" />
  </ContentPage.Content>
</ContentPage>
like image 376
tubefavorites.com Avatar asked Jun 29 '16 12:06

tubefavorites.com


1 Answers

The Content property is of type View. You cannot have two views into it. Replace it with

<StackLayout >
    <Label Text="Page"></Label>
    <Editor Text="I am an Editor" />
<StackLayout>
like image 146
Radin Gospodinov Avatar answered Jan 02 '23 01:01

Radin Gospodinov