Forum Cross Platform with Xamarin

How do you use a different control in xaml depending on iOS or Android

I have a control in my shared project which uses an ExtendedScrollView (inheriting from ScrollView) which in turn uses an ExtendedScrollViewRenderer in the iOS project.
In android, i dont want the control to be based on a ScrollView at all, i want to use a totally different control, so I cant just implement ExtendedScrollViewRenderer in the Android project.
Instead, I'd like to specify in the XAML of my shared project that I want to use ExtendedScrollView in iOS and a specific android class called ExtendedPageViewer on Android.
I have seen people use tags for changing little things like fonts and colors, but what if i wanted to change an entire control to only be used on one platform?

Best Answer


Sign In or Register to comment.