Hi,
I've created my own C# content view class with XAML using the "Add Item" menu option in Visual Studio.
I try to embed this content view into a the xaml of a Page class and at runtime the InitializeComponent() method in my ContentView's View.g.cs file throws
and exception "Exception: System.InvalidCastException: Specified" on the following line of code:
private void InitializeComponent() {
global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(TextFieldViewV1)); <<---- THIS THROWS EXCEPTION
xxamFieldValueEntry = global::Xamarin.Forms.NameScopeExtensions.FindByName<global::Xamarin.Forms.Entry>(this, "xxamFieldValueEntry");
}
The XAML for my Content View "TextFieldViewV1" is trivial:
<ContentView.Content>
</ContentView.Content>
I include the namespace of the content view in the Xaml of my test page and the project compiles without errors.