【发布时间】:2016-11-01 04:11:04
【问题描述】:
我有这个代码,但它得到了这个错误,我该如何解决这个问题?
“System.String”类型的对象无法转换为“Xamarin.Forms.View”类型。
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>
<StackLayout>
<Label Text="Text"></Label>
Some text here
<Editor Text="I am an Editor" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
【问题讨论】:
-
请出示完整的 XAML
-
Okey 已更新。
-
您是否从 Page1.xaml.cs 上的 ContentPage 继承?
-
请阅读我的更新
-
您应该: 1) 在上面的代码中包含有问题的 cmets,然后发布/接受解释您如何删除 cmets 并解决问题的答案;或 2) 删除问题。正如所写的那样,没有得到答复,这对任何人都没有帮助。
标签: xaml xamarin xamarin.forms