If I create a control that is rendered differently between platforms using ExportRenderer, can I add a method that can then be overridden by the class marked for ExportRenderer?
Example:
Class inside of PCL:
public class CustomListView : ListView {
public void MethodToOverride() {
//this method is what I want to override
}
}
Class inside of iOS:
[assembly: ExportRenderer(typeof(CustomListView), typeof(CustomListViewRenderer))]
public class CustomListViewRenderer : ListViewRenderer {
public void MethodToOverride() {
//do iOS-specific stuff here
}
}
What I'm trying to do is implement the platform-specific scroll functionality, since Xamarin.Forms doesn't have an API to use to automatically scroll (that I know of.)
Thanks,
Spencer