【发布时间】:2016-09-27 22:18:44
【问题描述】:
我有一个 Xamarin Forms 项目,我更新了 Xamarin,这是新的 App.cs
public App()
{
// The root page of your application
var content = new ContentPage
{
Title = "Proje1",
Content = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
Children = {
new Label {
HorizontalTextAlignment = TextAlignment.Center,
Text = "Welcome to Xamarin Forms!"
}
}
}
};
MainPage = new NavigationPage(content);
}
我收到此错误
无法将类型“Proje1.Views.View1”隐式转换为“Xamarin.Forms.Page”
当我做这个时
MainPage = new View1();
我之前是这样指向的,现在应该如何在App.cs中设置初始页面?
【问题讨论】:
-
什么是“View1” - 不在您的示例代码中?
-
我被改名了
标签: xamarin xamarin.forms