/// <summary>
/// Invoked when it comes time to set the root so the child classes can create their own menus
/// </summary>
private void OnCreateMenu(RootElement root)
{
var addGistSection = new Section();
root.Add(addGistSection);
addGistSection.Add(new MenuElement("New Gist", () => {
var gistController = new CreateGistController();
gistController.Created = (id) => {
NavigationController.PushViewController(new GistInfoController(id), true);
};
var navController = new UINavigationController(gistController);
PresentViewController(navController, true, null);
}, Images.Buttons.NewGist));
var gistMenuSection = new Section() { HeaderView = new MenuSectionView("Gists") };
root.Add(gistMenuSection);
gistMenuSection.Add(new MenuElement("My Gists", () => NavigationController.PushViewController(new MyGistsController(), true), Images.Buttons.MyGists));
gistMenuSection.Add(new MenuElement("Starred", () => NavigationController.PushViewController(new StarredGistsController(), true), Images.Buttons.Star2));
gistMenuSection.Add(new MenuElement("Public", () => NavigationController.PushViewController(new PublicGistsController(), true), Images.Buttons.Public));
// var labelSection = new Section() { HeaderView = new MenuSectionView("Tags") };
// root.Add(labelSection);
// labelSection.Add(new MenuElement("Add New Tag", () => { }, null));
var moreSection = new Section() { HeaderView = new MenuSectionView("Info") };
root.Add(moreSection);
moreSection.Add(new MenuElement("About", () => NavigationController.PushViewController(new AboutController(), true), Images.Buttons.Info));
moreSection.Add(new MenuElement("Feedback & Support", () => {
var config = UserVoice.UVConfig.Create("http://gistacular.uservoice.com", "lYY6AwnzrNKjHIkiiYbbqA", "9iLse96r8yki4ZKknfHKBlWcbZAH9g8yQWb9fuG4");
UserVoice.UserVoice.PresentUserVoiceInterface(this, config);
}, Images.Buttons.Feedback));
moreSection.Add(new MenuElement("Logout", Logout, Images.Buttons.Logout));
}