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

navigation drawer in control template wont show a navigation drawer as its content presenter

Thread ID:

Created:

Updated:

Platform:

Replies:

142497 Feb 6,2019 03:04 PM UTC Feb 14,2019 05:48 AM UTC Xamarin.Forms 5
loading
Tags: SfNavigationDrawer
mohammad kamali
Asked On February 6, 2019 03:04 PM UTC

Hi
I'm using navigation Drawer in a control template like below

<ControlTemplate x:Key="masterTemplate">
                <navigationdrawer:SfNavigationDrawer
                    FlowDirection="LeftToRight"
                        x:Name="navigationDrawer"
                        DrawerFooterHeight="0"
                        DrawerHeaderHeight="0"
                        DrawerWidth="260"
                        Position="Right"
                        VerticalOptions="FillAndExpand">
                    <navigationdrawer:SfNavigationDrawer.ContentView>
                        <StackLayout Spacing="0">
                            <Grid HeightRequest="60" BackgroundColor="{StaticResource primaryBlue}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="40" />
                                </Grid.ColumnDefinitions>
                                <control:IconButton
                                        Grid.Column="1"
                                        BackgroundColor="Transparent"
                                        BindingContext="{x:Reference navigationDrawer}"
                                        Clicked="ToggleMenu"
                                        TextColor="{StaticResource buttonTextWhite}"
                                        FontSize="{StaticResource largeFontSize}"
                                        HorizontalOptions="End"
                                        Text="&#xf0c9;"
                                        Type="Solid" />
                                <Label
                                        HorizontalTextAlignment="Start"
                                        VerticalTextAlignment="Center"
                                        FontFamily="{StaticResource Shabnam-Bold-FDFont}"
                                        FontSize="{StaticResource mediumFontSize}"
                                        TextColor="{StaticResource buttonTextWhite}"
                                        Text="{TemplateBinding Title}" />
                            </Grid>

                            <ContentPresenter x:Name="ContentPresenter" VerticalOptions="FillAndExpand" />

                        </StackLayout>
                    </navigationdrawer:SfNavigationDrawer.ContentView>
                    <navigationdrawer:SfNavigationDrawer.DrawerContentView>
                        <control:MenuView NavigationDrawer="{x:Reference navigationDrawer}" bitViewProps:PartialViewProps.PartialViewParentPage="{TemplateBinding}"/>
                    </navigationdrawer:SfNavigationDrawer.DrawerContentView>
                </navigationdrawer:SfNavigationDrawer>
            </ControlTemplate>


then when i try to control template of my page which has navigation drawer in it , it wont show content presenter and just show a white view. is there any way that i can do this?


Emil
Replied On February 7, 2019 11:38 PM UTC

are you using v16.4.0.52 ? i have same problem with the latest release. try version before. it works for me

mohammad kamali
Replied On February 8, 2019 07:23 AM UTC

Hi

i did try the version that you said but it still id not working

Selva Kumar  Veerakrishnan [Syncfusion]
Replied On February 11, 2019 04:02 AM UTC

Hi Mohammad,

Greetings from Syncfusion.

In the given code snippet, we have noticed that the SfNavigationDrawer control is used in the ControlTemplate but we could not find the target type to which this Template is assigned. Could you please provide more details like to which control this ControlTemplate has been used? This will be helpful for us to provide better solution on this.

Regards,
Selva Kumar V.

Pawel
Replied On February 13, 2019 03:06 PM UTC

Hi,

I encountered the same problem with version v16.4.0.52. After updating up to 0.53 everything works like a charm.

Regards.

Paul.




Dhanasekar R [Syncfusion]
Replied On February 14, 2019 05:48 AM UTC

Hi Paul,  
 
Glad that the issue has been resolved. Please get back to us if any further assistance on this. 
 
Regards, 
Dhanasekar

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