SideDrawer Control Not Showing DrawerContent

1 Answer 143 Views
SideDrawer
Dean
Top achievements
Rank 1
Dean asked on 26 Mar 2023, 02:28 PM | edited on 26 Mar 2023, 02:34 PM

Hello,

 

I seem to be having an issue with the Telerik .NET MAUI SideDrawer control. I can see the MainContent view, however, I have no means to open the DrawerContent.

 

Below is my ContentPage markup and a screenshot of the result.

 

Is my markup correct? Is it just my device causing the issue?

 

ContentPage Markup

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="SynergyMobile4.Views.TestReport.TR_Index"
             xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
             xmlns:tr="clr-namespace:SynergyMobile4.ViewModels.TestReport"
             Title="Test Report">
    <VerticalStackLayout>

        <telerik:RadSideDrawer x:Name="drawer" 
                                DrawerLength="200">
            <telerik:RadSideDrawer.MainContent>
                <Label Text="Main content" />
            </telerik:RadSideDrawer.MainContent>
            <telerik:RadSideDrawer.DrawerContent>
                <VerticalStackLayout Spacing="10"
                                    BackgroundColor="Red"
                                        Padding="10, 10, 0, 0">
                    <Button Text="Mail" />
                    <Button Text="Calendar" />
                    <Button Text="People" />
                    <Button Text="Tasks" />
                </VerticalStackLayout>
            </telerik:RadSideDrawer.DrawerContent>
        </telerik:RadSideDrawer>
    </VerticalStackLayout>

</ContentPage>

 

Result (screenshot from Galaxy S22 physical device)

 

Edit:

If I hardcode the [IsOpen] property to "True" in the XAML, the drawer opens and I can see the items, but I still have no button or control to open it naturally.

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 27 Mar 2023, 08:49 AM

Hello Dean,

By default, the drawer can be visualized using a flick gesture on mobile or custom UI which has to manipulate the IsOpen property on Desktop. Did you try the flick gesture to open the drawer? 

In addition, if you want to add a button to open/close the drawer, an example can be found in our SideDrawer Getting started example: https://github.com/telerik/maui-samples/blob/main/Samples/SdkBrowser/Examples/SideDrawerControl/GettingStartedCategory/GettingStartedExample/SideDrawerGettingStartedXaml.xaml 

Let me know if you have any additional questions. 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
SideDrawer
Asked by
Dean
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or