void SetupHtml() { var dialog_delegete = new MyContentView(this); dialog_delegete.OnNavigating += ( object sender, NSUrlRequest request, UIWebViewNavigationType naviType) => { if (request.Url.AbsoluteString.IndexOf("close") >= 0) { this.DismissViewController(true, () => {}); } }; HtmlView.Html.Delegate = dialog_delegete; string contentDirectoryPath = System.IO.Path.Combine(NSBundle.MainBundle.BundlePath, ""); string htmml = @"<html><body><a href=""#close"">Close</a></body></html>"; HtmlView.Html.LoadHtmlString(htmml, new NSUrl(contentDirectoryPath, true)); }
public PanaramaView() { selectedColor = Styles.Styles.CurrentStyle.AccentColor; titleColor = selectedColor.MultiplyAlpha(.25); titleFont = Styles.Styles.CurrentStyle.HeaderTextThinFont; Children.Add(scrollView = new PagingScrollView { Orientation = ScrollOrientation.Horizontal, Content = content = new MyContentView { Parent = this }, }); scrollView.Scrolled += ScrollView_Scrolled; AbsoluteLayout.SetLayoutFlags(scrollView, AbsoluteLayoutFlags.SizeProportional); AbsoluteLayout.SetLayoutBounds(scrollView, new Rectangle(0, 0, 1, 1)); }
void SetupHtml() { var dialog_delegete = new MyContentView (this); dialog_delegete.OnNavigating += ( object sender, NSUrlRequest request, UIWebViewNavigationType naviType) => { if (request.Url.AbsoluteString.IndexOf ("close") >= 0) { this.DismissViewController (true, () => {}); } }; HtmlView.Html.Delegate = dialog_delegete; string contentDirectoryPath = System.IO.Path.Combine (NSBundle.MainBundle.BundlePath, ""); string htmml = @"<html><body><a href=""#close"">Close</a></body></html>"; HtmlView.Html.LoadHtmlString(htmml, new NSUrl(contentDirectoryPath, true)); }