Maui : Inheritance
I love exploring new things but suddenly i got stopped by this issue. When i try subclassing a maui element it gives me this exception : NO JAVA PEER TYPE FOUND.
/**
* Just to demonstarte the issue
* using TextView as a sample.
*/
public class TextView : View
{
public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextView), default(string));
public string Text => (string)GetValue(TextProperty);
}
/**
* Subclassing maui's textView
*/
public class NativeTextView : MauiTextView;
/**
* Handler for TextView and NativeTextView.
*/
public class TextViewHandler : ViewHandler<TextView, NativeTextView>;
What ever i do, it always gives me this exception, is this a bug?? or the app doesn't support this kind of inheritance.
It doesn't support it and there is guarantee it will (ex. #121 & #273 )
I really feel like i'm not allowed to do something like this because the app doesnt support it. But, it is nice to hear that there could be a chance of supporting.
I do have plans to try implementing this. However it must be after I've finished other important stuff since this is a time consuming experiment that has a good chance of failing