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

TabbedPage - visibility of children

$
0
0

Hi, i'm looking for a mvvm way to populate a tabbedPage. Depends on users credentials, i 'll display some page or not.

The only working way i found, was to use code behind and delete my viewModel file (because it was useless...)

I was doing like that with xaml :

<TabbedPage.Children>
    <views:ActualitesPage />
    <views:SiteCePage IsVisible="{Binding IsVisiblePortail, Mode=OneWay}" />
    <views:BilletteriePage IsVisible="{Binding IsVisibleBilletterie, Mode=OneWay}" />
    <views:ContactPage />
    <views:ProfilPage />
</TabbedPage.Children>

But it seems that you can't change the visibility a page.

I tried with using an itemssource and a dataTemplate. Could work but i need a different view for each page. That's why i think itemsSource isn't for my case.

How did you guys achieve such a thing ?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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