Hi,
I developed simple project for show web site in webview.
These are my classes:
`public class WebPage:BasePage
{
public WebPage ()
{
var stack = new StackLayout
{
Orientation=StackOrientation.Vertical,
HorizontalOptions=LayoutOptions.FillAndExpand,
VerticalOptions=LayoutOptions.FillAndExpand
};
var myWebView = new MyWebView ()
{
VerticalOptions=LayoutOptions.FillAndExpand,
HorizontalOptions=LayoutOptions.FillAndExpand,
Source="http://www.google.com/"
};
stack.Children.Add (myWebView);
Content = stack;
}
}`
`
[assembly: ExportRenderer( typeof( WebPage), typeof( WebPageRenderer))]
namespace Vodaxi.iOS
{
public partial class WebPageRenderer : WebViewRenderer
{
private UIWebView _webView;
protected override void OnElementChanged(VisualElementChangedEventArgs e)
{
base.OnElementChanged (e);
if (e.OldElement == null) { // perform initial setup
var webView = (UIWebView)this.NativeView;
webView.ScalesPageToFit = true;
}
}
}
}`
`public static class App
{
public static Page GetMainPage ()
{
return new WebPage ();
}
}`
But when i run project im getting this error:
Unable to cast object of type 'Vodaxi.WebPage' to type 'Xamarin.Forms.WebView'.
Where did i do wrong?
Thanks.
PS: Xamarin.forms version="1.2.3.6257"