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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfNavigationDrawer.ContentView problem with binding two ContentView

Thread ID:





149170 Nov 17,2019 09:24 AM UTC Nov 19,2019 08:54 AM UTC Xamarin.Forms 4
Tags: SfNavigationDrawer
Asked On November 17, 2019 09:32 AM UTC

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 ?


Replied On November 17, 2019 09:34 AM UTC

Here is my code:

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

Rachel A [Syncfusion]
Replied On November 18, 2019 12:29 PM UTC

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. 

Replied On November 19, 2019 03:10 AM UTC

Hi Rachel,

Thank for your supports the problem was solved.

Rachel A [Syncfusion]
Replied On November 19, 2019 08:54 AM UTC

Hi Kien, 
Thank you for the confirmation. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon