We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfNavigationDrawer.ContentView problem with binding two ContentView

Hi, first sorry for my bad english.  
I'm got trouble with this in my project. Let say i have two ContentView - A and B. And in NavigationDrawer Menu i have two item is 1 and 2.

The Item 1 will make ContentView A IsVisible and ContView B is not, Item 2 will do the opposite.

The ContentPage containt NavigationDrawer is binding ViewModel C.

But then,  ContentView A and B is binding another ViewModel. So the property IsVisible of ContentView A and B is not available on ContentPage when binding with ViewModel C.

If im not binding ViewModel for ContentView A and B it's will work fine. So how can i fix this ?


4 Replies

KI Kien.Phat November 17, 2019 04:34 AM

Here is my code:

            <Grid BackgroundColor="Transparent">
                <view:ContentViewB IsVisible="{Binding ContentViewVisible,Converter={StaticResource boolToBoolConventer}}"/>
                <view1:DuyetHoaDon  IsVisible="{Binding ContentViewVisible}" />

RA Rachel A Syncfusion Team November 18, 2019 07:29 AM

Hi Kien, 
Greetings from Syncfusion. 
We have prepared the sample to achieve the switching of two content views in SfNavigationDrawer. Please try the attached sample from the below link. 

KI Kien.Phat November 18, 2019 10:10 PM

Hi Rachel,

Thank for your supports the problem was solved.

RA Rachel A Syncfusion Team November 19, 2019 03:54 AM

Hi Kien, 
Thank you for the confirmation. 

Live Chat Icon For mobile
Up arrow icon