Centralize SideDrawer

2 posts, 0 answers
  1. Trevor
    Trevor avatar
    22 posts
    Member since:
    Feb 2017

    Posted 02 Aug Link to this post

    Hi,

     

    So I have a SideDrawer defined in Xaml (a lot of the code was modified from ypur QSF app). I am wondering how I could centralize the SideDrawer, so that way I dont have to redefine the SideDrawer (menu and maincontent) on every page, because I know this is really bad. Im new to Xamarin.Forms so I not really sure how to approach this.

    Thanks

  2. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    488 posts

    Posted 03 Aug Link to this post

    Hello Trevor,

    If I understand you correctly, you want a root page to be using the RadSideDrawer, but navigate the other pages inside the Drawer content.

    This is not possible at this time because the Content area of the SideDrawer only accepts content of type View (meaning that only UI elements can be placed in there, not ContentPage or NavigationPage types). We do have this feature request on our backlog, you can up-vote and follow it here.

    You could use a Xamarin Forms ControlTemplate approach and swap out the drawer content, but this approach means that you technically never leave the page. You can define content templates and swap out the drawer content dynamically. This is a more advanced technique that is outside the scope of Telerik support, but Xamarin has a good tutorial on the matter here if you'd like to learn more.


    If this answers your question, you can let me now by selecting the ticket's "Mark as resolved" button. If not, please let me know how I can of further assistance.

    Thank you for contacting Support and for choosing UI for Xamarin.

    Regards,
    Lance | Tech Support Engineer, Sr.
    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
Back to Top