我正在尝试为tizen TV创建一个C#Xamarin项目 每当我包含WebView控件时,应用程序就会启动,然后立即关闭。
我已经为互联网设置了特权(以及更多),但是同一件事一直在发生。但是,当我尝试使用其他控件(标签,按钮)时,效果很好。 ``
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace CrossTemplate
{
public class App : Application
{
public App()
{
var html = new HtmlWebViewSource
{
Html = "your html here"
};
// The root page of your application
MainPage = new ContentPage
{
Content = new StackLayout
{
Orientation = StackOrientation.Horizontal,
Children = {
new WebView
{
WidthRequest = 100,
HeightRequest = 100,
/* Source = "http://google.com/" Url or pure html same thing happens*/
Source = html
}
}
}
};
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}