Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Specified cast is not valid. when using ExportRenderer in XAML.Forms?

$
0
0

What's wrong with this code, I get runtime error ? ==> [assembly: ExportRendererAttribute (typeof (CheckVATeuView), typeof (formContentXAML))]

checkVateuView is a XAML page in my PCL (derived from ContentPage)
and formContentXAML is in iOS project which is also derived form ContentPage

**[assembly: ExportRendererAttribute (typeof (CheckVATeuView), typeof (formContentXAML))]**
namespace CheckVAT.iOS
{
    public partial class formContentXAML : ContentPage
    {
        public formContentXAML ()
        {
            InitializeComponent ();
        }
    }
}

ERROR: System.InvalidCastException - Specified cast is not valid.

I also tried: [assembly: ExportRenderer (typeof (CheckVATeuView), typeof (formContentXAML))]


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>