【发布时间】:2017-02-04 21:40:25
【问题描述】:
我正在使用便携式 Xamarin 表单项目。调试页面时出现此错误
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.Views.WebView1">
<ContentView.Content>
</ContentView.Content>
</ContentPage>
xaml.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Proje1.Views
{
public partial class WebView1 : ContentPage
{
public WebView1()
{
InitializeComponent();
Label header = new Label
{
Text = "WebView",
FontSize = 20,
FontAttributes = FontAttributes.Bold,
HorizontalOptions = LayoutOptions.Center
};
WebView wView = new WebView
{
Source = new UrlWebViewSource
{
Url = "https://www.acikakademi.com",
},
VerticalOptions = LayoutOptions.FillAndExpand
};
this.Content = new StackLayout
{
Children =
{
header,
wView
}
};
}
}
}
我应该怎么做才能解决这个问题?
【问题讨论】:
标签: xaml mobile xamarin xamarin.forms