SideDrawer on TabbedPage possible?

4 posts, 0 answers
  1. VincentH
    VincentH avatar
    8 posts
    Member since:
    Sep 2016

    Posted 26 Oct Link to this post

    I need to add a side drawer to an app that has a Xamarin Forms TabbedPage as it's main page - I am aiming for the same navigation as e.g. the Twitter app on Android.

    However the MainContent property of the RadSideDrawer is of type View instead of Page so I cannot set it to a TabbedPage instance.

    -> Is it possible to use a TabbedPage with RadSideDrawer? If yes, how?

    If this is not possible, would the standard Xamarin Forms MasterDetailPage, offer an alternative?
    It has Master and Detail properties of type Page and it is used to create a side drawer in e.g. the Hanselman.Forms app (although not on a TabbedPage).

  2. VincentH
    VincentH avatar
    8 posts
    Member since:
    Sep 2016

    Posted 28 Oct in reply to VincentH Link to this post

    PS When I create a single header instance and return that each time in the GroupHeaderTemplate (see code below), the header looks OK but I still wonder whether this invoke twice behaviour is by design or a bug?

    var header = new Label { HorizontalTextAlignment = TextAlignment.Center, Text = "Welcome to Xamarin Forms!" };
    GroupHeaderTemplate = new DataTemplate(() => {
      return header; // This is called twice instead of once so do not create new view instances here
    });


  3. DevCraft banner
  4. VincentH
    VincentH avatar
    8 posts
    Member since:
    Sep 2016

    Posted 31 Oct in reply to VincentH Link to this post

    Pls ignore my above reply; it belongs to another question

    I would still like to see my question on SideDrawer answered!

  5. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 31 Oct Link to this post

    Hi Vincent

    One possible approach here would be to place RadSideDrawer within a page and use it as Master in a MasterDetailPage and use a TabbedPage as Detail. Alternatively, you can use only TabbedPage, but you will need to place one RadSideDrawer control within every child page.

    Best regards,
    Ves
    Telerik by Progress
    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
DevCraft banner