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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

NavigationDrawer and ContentPresenter iOS problem

Thread ID:





131502 Jul 13,2017 10:35 AM UTC Mar 22,2018 12:41 PM UTC Xamarin.Forms 5
Tags: SfNavigationDrawer
Matei Ionut Alexandru
Asked On July 13, 2017 10:35 AM UTC


I have a problem when I use SfNavigationDrawer in a application level ControlTemplate with a ContentPresenter.

More exactly my App.xaml looks like this:

<Application xmlns="http://xamarin.com/schemas/2014/forms"
            <ControlTemplate x:Key="MyTemplate">
                <navigationdrawer:SfNavigationDrawer x:Name="navigationDrawer" DrawerHeaderHeight="160">
                        <Grid x:Name="mainContentView" BackgroundColor="White">
                                <RowDefinition Height="auto"/>
                            <StackLayout BackgroundColor="#1aa1d6" Orientation="Horizontal">
                                <Button x:Name="hamburgerButton" HeightRequest="50" WidthRequest="50" HorizontalOptions="Start" FontSize="20" BackgroundColor="#1aa1d6"/>
                                <Label HeightRequest="50" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Text="Home" FontSize="16" TextColor="White" BackgroundColor="#1aa1d6"/>

                            <ContentPresenter Grid.Row="1" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></ContentPresenter>
                            <Label Text="James Pollock" Grid.Row="1" HorizontalTextAlignment="Center" HorizontalOptions="Center" FontSize="20" TextColor="White"/>
                        <Label HeightRequest="50" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" 
                               Text="Drawer Content View" FontSize="16" TextColor="White" BackgroundColor="#1aa1d6"/>

The ContentView part of  SfNavigationDrawer contains a ContentPresenter that should be populated with content at runtime.
My main page (the content I wanna put into ContentPresenter) looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"

    <ContentView x:Name="contentView" Padding="0,20,0,0"
                 ControlTemplate="{StaticResource MyTemplate}" BackgroundColor="AliceBlue">
        <StackLayout VerticalOptions="CenterAndExpand" BackgroundColor="Red">
            <Label Text="Main Page" HorizontalOptions="Center" />


Normally, the content of MainPage.xaml wil be loaded into that ContentPresenter from the ControlTemplate. On Android this happens but on iOS NOT. On iOS everything gets displayed except the ContentPresenter. 

For installation and config parts of the SfNavigationDrawer control I basically followed the documentation page https://help.syncfusion.com/xamarin/sfnavigationdrawer/overview.

It may be a bug of the control or I dont know. Any help or suggestions will be appreciated. 

For testing I used:
iPhone 7 simulator with iOS 10.3
Xamarin.Forms version=""
Syncfusion.Xamarin.SfNavigationDrawer.IOS version=""
Syncfusion.Xamarin.SfNavigationDrawer version=""

Thank you!

Vanaja  Annasamy [Syncfusion]
Replied On July 17, 2017 12:41 PM UTC

Hi Matei,

A support incident to track the status of this defect has been created under your account.

Please log on to our support website to check for further updates.

Link: https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/    

Vanaja R.A.

Replied On March 19, 2018 09:32 PM UTC

Can I have an update for this?

Rabhia Beham Kathar Mideenar [Syncfusion]
Replied On March 20, 2018 12:14 PM UTC

Hi Thanh,

We have prepared a workaround sample with SfNavigationDrawer Control to display the ContentPresenter in iOS.Please have the sample from the below link.

Sample Link: http://www.syncfusion.com/downloads/support/forum/131502/ze/NavigationDrawer_contentpresent_workaround-1658146581 

Please let us know if you have any concern.

Rabhia Beham K. 

Replied On March 20, 2018 01:08 PM UTC

Thanks Rabhia. I think I misread the question. My question is the opposite: Put the controlTemplate inside the ContentView of sfNavigationDrawer not working. 

Rabhia Beham Kathar Mideenar [Syncfusion]
Replied On March 22, 2018 12:41 PM UTC

Hi Thanh,

We have analysed your requirement and prepared a sample with SfNavigationDrawer Control. We could not able to reproduce from our side. Please have the sample from the below link.

Sample Link: http://www.syncfusion.com/downloads/support/forum/131502/ze/NavigationDrawer131502-1345023586 

If the issue get reproduced at your end, please update us with modified sample and with replication steps to reproduce the issue and also in which platform the issue is getting reproduced at your end.This could help us to provide better solution on this.

Please let us know if you have any concern.

Rabhia Beham K.



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

or the page will be automatically redirected to 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