コード例 #1
0
 public static void SetupNavigationBar(SidebarNavigation.SidebarController sidebarController, NavController navController, UINavigationItem navItem, UIBarButtonItem menuButton)
 {
     menuButton = new UIBarButtonItem(UIImage.FromBundle("hamburger_menu_white.png")
             , UIBarButtonItemStyle.Plain
             , (sender, args) => {
                 sidebarController.ToggleMenu();
             });
     //menuButton.TintColor = Helper.Theme.Color.C2;
     navItem.SetLeftBarButtonItem(menuButton, true);
     navController.NavigationBar.BackgroundColor = Helper.Theme.Color.C2;
     navController.NavigationBar.BarStyle = UIBarStyle.BlackOpaque;
     navController.NavigationBar.TintColor = Helper.Theme.Color.C1;
     navController.NavigationBar.BarTintColor = Helper.Theme.Color.C2;
 }
コード例 #2
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (SidebarMenuController != null)
            {
                SidebarMenuController.RemoveFromParentViewController();
                SidebarMenuController.Dispose();
                SidebarMenuController = null;
            }

            if (NavMenuController != null)
            {
                NavMenuController.RemoveFromParentViewController();
                NavMenuController.Dispose();
                NavMenuController = null;
            }
        }
コード例 #3
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (SidebarMenuController != null)
            {
                SidebarMenuController.RemoveFromParentViewController();
                SidebarMenuController.Dispose();
                SidebarMenuController = null;
            }

            if (NavMenuController != null)
            {
                NavMenuController.RemoveFromParentViewController();
                NavMenuController.Dispose();
                NavMenuController = null;
            }
        }
コード例 #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            try
            {
                _logging.WriteLine(Lib.Logging.MessageType.Information, "Starting application in HomeViewController ViewDidLoad method");

                this.NavMenuController = new NavController();

                //set the default view
                this.NavMenuController.PushViewController(new BlankViewController(), false);
                this.NavMenuController.PushViewController(new AboutController(), false);

                //load the side bar controller to create the hamburger menu
                this.SidebarMenuController = new SidebarController(this, NavMenuController, new MenuViewController(_menuWidth));
                this.SidebarMenuController.MenuWidth = _menuWidth;
                this.SidebarMenuController.MenuLocation = MenuLocations.Left;
            }
            catch (Exception ex)
            {
                this.DealWithErrors(ex);
            }
        }
コード例 #5
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            try
            {
                _logging.WriteLine(Lib.Logging.MessageType.Information, "Starting application in HomeViewController ViewDidLoad method");

                this.NavMenuController = new NavController();

                //set the default view
                this.NavMenuController.PushViewController(new BlankViewController(), false);
                this.NavMenuController.PushViewController(new AboutController(), false);

                //load the side bar controller to create the hamburger menu
                this.SidebarMenuController              = new SidebarController(this, NavMenuController, new MenuViewController(_menuWidth));
                this.SidebarMenuController.MenuWidth    = _menuWidth;
                this.SidebarMenuController.MenuLocation = MenuLocations.Left;
            }
            catch (Exception ex)
            {
                this.DealWithErrors(ex);
            }
        }