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

Change contentpage's content depending platform (in XAML)

$
0
0

I have to use something else than ListView for iOS version of my application because ListView is ugly, bugged on iOS (IsVisible doesn't work) and too different from Android.
So i was looking for something like OnPlatform in XAML to choose ListView for Android and something else like a ScrollView for iOS, i couldn't find any documentation for something else than Padding or styles things with OnPlatform for example
Something like that ?

<OnPlatForm>
    <OnPlatform.Platforms>
        <On Platform="Android">
            <ContentPage.Content>
                <ListView  ItemsSource="{Binding xxx}" 
                        HasUnevenRows="True">
                    ...
                </ListView>
            </ContentPage.Content>
        </On>
    </OnPlatform.Platforms>
</OnPlatForm>

<OnPlatForm>
    <OnPlatform.Platforms>
        <On Platform="iOS">
            <ContentPage.Content>
                    <ScrollView >
                    ...
                </ScrollView >
            </ContentPage.Content>
        </On>
    </OnPlatform.Platforms>
</OnPlatForm>

Thanks for help !


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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