public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
{
var vc = new WebViewController(this)
{
Autorotate = dvc.Autorotate
};
web = new UIWebView(UIScreen.MainScreen.ApplicationFrame)
{
BackgroundColor = UIColor.White, ScalesPageToFit = true, AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight
};
web.LoadStarted += delegate { NetworkActivity = true; };
web.LoadFinished += delegate { NetworkActivity = false; };
web.LoadError += (webview, args) =>
{
NetworkActivity = false;
if (web != null)
{
web.LoadHtmlString(String.Format("<html><center><font size=+5 color='red'>An error occurred:<br>{0}</font></center></html>", args.Error.LocalizedDescription), null);
}
};
vc.NavigationItem.Title = Caption;
vc.View.AddSubview(web);
dvc.ActivateController(vc, dvc);
var url = new NSUrl(Value.AbsoluteUri);
web.LoadRequest(NSUrlRequest.FromUrl(url));
}