This is a migrated thread and some comments may be shown as answers.

Keep SideDrawer Open when main content clicked

1 Answer 98 Views
SideDrawer
This is a migrated thread and some comments may be shown as answers.
Leon
Top achievements
Rank 1
Leon asked on 19 Aug 2017, 12:25 PM

Is there any way to keep the SideDrawer open even after the user clicks the main content?

thanks.

1 Answer, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 23 Aug 2017, 09:04 AM
Hello Leon,

The Xamarin.Forms SideDrawer does not provide this functionality. I have logged it as a feature request in our Ideas & Feedback portal. You can track its progress on the following address - SideDrawer: Expose StaysOpen property. You can "follow the item" in order to subscribe for automatic notifications. I have also added some points to your account for the suggestion.

In the meantime, you can achieve the behavior for the Android platform as the functionality is available there. The following custom renderer should do:

class CUstomSideDrawerRenderer : SideDrawerRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<RadSideDrawer> e)
        {
            base.OnElementChanged(e);
            this.Control.DrawerOpened += Control_DrawerOpened;
        }
 
        private void Control_DrawerOpened(object sender, Com.Telerik.Android.Primitives.Widget.Sidedrawer.DrawerOpenedEventArgs e)
        {
            this.Control.IsLocked = true;
        }
    }

Have a great rest of the week.

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
SideDrawer
Asked by
Leon
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question
or