Skip to content

Instantly share code, notes, and snippets.

@LucioMSP
Last active November 12, 2019 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LucioMSP/98d26800b33c8e294f6fc91a53d45077 to your computer and use it in GitHub Desktop.
Save LucioMSP/98d26800b33c8e294f6fc91a53d45077 to your computer and use it in GitHub Desktop.
Example of how to implement Telerik SideDrawer control in Xamarin.Forms applications
using Xamarin.Forms;
using Telerik.XamarinForms.Primitives;
namespace TrkSideDrawer.Views
{
public class SideDrawerCode : ContentPage
{
public SideDrawerCode()
{
var drawerContent = new StackLayout();
drawerContent.Margin = new Thickness(18, 30);
drawerContent.Children.Add(new Button { Text = "Home" });
drawerContent.Children.Add(new Button { Text = "Calendar" });
drawerContent.Children.Add(new Button { Text = "News" });
drawerContent.Children.Add(new Button { Text = "Tasks" });
var sideDrawer = new RadSideDrawer
{
MainContent = new Label { Text = "Side Menu", Margin = new Thickness(15, 50),
},
DrawerContent = drawerContent,
DrawerLength = 200
};
Content = sideDrawer;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment