private static UIBarButtonItem CreateBarButtonItem(SidebarController sidebarController, IMvxSidebarMenu mvxSidebarMenu = null)
        {
            UIBarButtonItem barButtonItem;

            if (mvxSidebarMenu != null)
            {
                barButtonItem = new UIBarButtonItem(mvxSidebarMenu.MenuButtonImage
                    , UIBarButtonItemStyle.Plain
                    , (sender, args) =>
                    {
                        sidebarController.MenuWidth = mvxSidebarMenu.MenuWidth;
                        sidebarController.ViewWillAppear(false);
                        sidebarController.ToggleMenu();
                    });
            }
            else
            {
                barButtonItem = new UIBarButtonItem("Menu"
                    , UIBarButtonItemStyle.Plain
                    , (sender, args) =>
                    {
                        sidebarController.ToggleMenu();
                    });
            }

            return barButtonItem;
        }
        private static UIBarButtonItem CreateBarButtonItem(SidebarController sidebarController, IMvxSidebarMenu mvxSidebarMenu = null)
        {
            UIBarButtonItem barButtonItem;

            if (mvxSidebarMenu != null)
            {
                barButtonItem = new UIBarButtonItem(mvxSidebarMenu.MenuButtonImage
                                                    , UIBarButtonItemStyle.Plain
                                                    , (sender, args) =>
                {
                    if (sidebarController.IsOpen)
                    {
                        mvxSidebarMenu.MenuWillClose();
                    }
                    else
                    {
                        mvxSidebarMenu.MenuWillOpen();
                    }
                    sidebarController.MenuWidth = mvxSidebarMenu.MenuWidth;
                    sidebarController.ViewWillAppear(false);
                    sidebarController.ToggleMenu();
                });
            }
            else
            {
                barButtonItem = new UIBarButtonItem("Menu"
                                                    , UIBarButtonItemStyle.Plain
                                                    , (sender, args) =>
                {
                    sidebarController.ToggleMenu();
                });
            }

            return(barButtonItem);
        }