Exemple #1
0
 public void SetSplitViewController(MGSplitViewController controller)
 {
     if (controller != _splitViewController)
     {
         _splitViewController = controller;
         SetNeedsDisplay();
     }
 }
Exemple #2
0
        public MGSplitDividerView(MGSplitViewController splitViewController)
        {
            SplitViewController = splitViewController;

            // TODO: set up options for this!!!
            //			AllowsDragging = TouchFactory.Instance.AllowSplitViewResizing;
            //
            ContentMode = UIViewContentMode.Redraw;
        }
Exemple #3
0
        public MGSplitDividerView(MGSplitViewController splitViewController)
        {
            SplitViewController = splitViewController;

// TODO: set up options for this!!!
//			AllowsDragging = TouchFactory.Instance.AllowSplitViewResizing;
//
            ContentMode = UIViewContentMode.Redraw;
        }
Exemple #4
0
        public MGDetailViewController(MGSplitViewController splitController)
        {
            this.splitController = splitController;

            toolbar                = new UIToolbar();
            toggleItem             = new UIBarButtonItem();
            verticalItem           = new UIBarButtonItem();
            dividerStyleItem       = new UIBarButtonItem();
            masterBeforeDetailItem = new UIBarButtonItem();
        }
        public MGDetailViewController(MGSplitViewController splitController)
        {
            this.splitController = splitController;

            toolbar = new UIToolbar();
            toggleItem = new UIBarButtonItem();
            verticalItem = new UIBarButtonItem();
            dividerStyleItem = new UIBarButtonItem();
            masterBeforeDetailItem = new UIBarButtonItem();
        }
Exemple #6
0
 new void SplitViewController(MGSplitViewController svc, UIViewController viewController,
                              UIBarButtonItem barButtonItem, UIPopoverController pc)
 {
     if (barButtonItem != null)
     {
         barButtonItem.Title = "Popover";
         UIBarButtonItem[] items = toolbar.Items;
         items[0] = barButtonItem;
         toolbar.SetItems(items, true);
     }
     popoverController = pc;
 }
Exemple #7
0
        public void Init(UIViewController viewController)
        {
            _masterNavigationController = new UINavigationController(viewController);


            if (IsTablet && _tabletOptions.TabletLayout == TabletLayout.MasterPane)
            {
                // toss a generic view in the detail pane
                _splashViewController       = new SplashViewController(_options.SplashBitmap);
                _detailNavigationController = new UINavigationController(_splashViewController);

                // initialize the SplitPane
                _splitViewController = new MGSplitViewController();
                // added the following to set RootViewController

                _splitViewController.SetViewControllers(new UIViewController[2] {
                    _masterNavigationController, _detailNavigationController
                });
                _splitViewController.SetShowsMasterInPortrait(_tabletOptions.MasterShowsinPotrait);
                _splitViewController.SetShowsMasterInLandscape(_tabletOptions.MasterShowsinLandscape);
                _splitViewController.SetMasterBeforeDetail(_tabletOptions.MasterBeforeDetail);
                if (_tabletOptions.AllowDividerResize)
                {
                    _splitViewController.SetDividerStyle(MGSplitViewDividerStyle.PaneSplitter);
                }
                else
                {
                    _splitViewController.SetDividerStyle(MGSplitViewDividerStyle.Thin);
                }

                if (_window != null)
                {
                    _window.RootViewController = _splitViewController;
                }


                // primary view with be the split view
                this.View = _splitViewController.View;

                if (_options.NavigationBarTintColor != UIColor.Clear)
                {
                    _masterNavigationController.NavigationBar.TintColor = _options.NavigationBarTintColor;
                    _detailNavigationController.NavigationBar.TintColor = _options.NavigationBarTintColor;
                }
            }
            else
            {
                // we are an iPhone, skip the split view and use the navigation controller instead!
                this.View = _masterNavigationController.View;
                _window.RootViewController = _masterNavigationController;
            }
        }
Exemple #8
0
        // Called when the view is shown again in the split view, invalidating the button and popover controller.
        new void SplitViewController(MGSplitViewController svc, UIViewController viewController, UIBarButtonItem barButtonItem)
        {
            if (barButtonItem != null)
            {
                UIBarButtonItem[] items = toolbar.Items;

                for (int i = 0; i < items.Length; i++)
                {
                    if (items[i] == barButtonItem)
                    {
                        items[i] = null;
                    }
                }

                toolbar.SetItems(items, true);
            }
            popoverController = null;
        }
Exemple #9
0
 new void SplitViewController(MGSplitViewController svc, bool isVertical)
 {
 }
Exemple #10
0
 new void SplitViewController(MGSplitViewController svc, UIPopoverController pc, UIViewController viewController)
 {
 }
        new void SplitViewController(MGSplitViewController svc, UIViewController viewController,
		                         UIBarButtonItem barButtonItem, UIPopoverController pc)
        {
            if (barButtonItem != null) {
                barButtonItem.Title = "Popover";
                UIBarButtonItem[] items = toolbar.Items;
                items[0] = barButtonItem;
                toolbar.SetItems(items, true);
            }
            popoverController = pc;
        }
 new void SplitViewController(MGSplitViewController svc, UIPopoverController pc, UIViewController viewController)
 {
 }
        // Called when the view is shown again in the split view, invalidating the button and popover controller.
        new void SplitViewController(MGSplitViewController svc, UIViewController viewController, UIBarButtonItem barButtonItem)
        {
            if (barButtonItem != null) {
                UIBarButtonItem[] items = toolbar.Items;

                for(int i = 0; i < items.Length; i++)
                    if (items[i] == barButtonItem) items[i] = null;

                toolbar.SetItems(items, true);
            }
            popoverController = null;
        }
        public void Init(UIViewController viewController)
        {
            _masterNavigationController = new UINavigationController(viewController);

            if (IsTablet && _tabletOptions.TabletLayout == TabletLayout.MasterPane)
            {
                // toss a generic view in the detail pane
                _splashViewController = new SplashViewController(_options.SplashBitmap);
                _detailNavigationController = new UINavigationController(_splashViewController);

                // initialize the SplitPane
                _splitViewController = new MGSplitViewController();
                // added the following to set RootViewController

                _splitViewController.SetViewControllers(new UIViewController[2] { _masterNavigationController, _detailNavigationController });
                _splitViewController.SetShowsMasterInPortrait(_tabletOptions.MasterShowsinPotrait);
                _splitViewController.SetShowsMasterInLandscape(_tabletOptions.MasterShowsinLandscape);
                _splitViewController.SetMasterBeforeDetail(_tabletOptions.MasterBeforeDetail);
                if (_tabletOptions.AllowDividerResize)
                    _splitViewController.SetDividerStyle(MGSplitViewDividerStyle.PaneSplitter);
                else
                    _splitViewController.SetDividerStyle(MGSplitViewDividerStyle.Thin);

                if (_window != null)
                    _window.RootViewController = _splitViewController;

                // primary view with be the split view
                this.View = _splitViewController.View;

                if (_options.NavigationBarTintColor != UIColor.Clear)
                {
                    _masterNavigationController.NavigationBar.TintColor = _options.NavigationBarTintColor;
                    _detailNavigationController.NavigationBar.TintColor = _options.NavigationBarTintColor;
                }
            }
            else
            {
                // we are an iPhone, skip the split view and use the navigation controller instead!
                this.View = _masterNavigationController.View;
                _window.RootViewController = _masterNavigationController;
            }
        }
 new void SplitViewController(MGSplitViewController svc, bool isVertical)
 {
 }
Exemple #16
0
 new void SplitViewController(MGSplitViewController svc, float position)
 {
 }
 new float SplitViewController(MGSplitViewController svc, float proposedPosition, SizeF viewSize)
 {
     return proposedPosition;
 }
 new void SplitViewController(MGSplitViewController svc, float position)
 {
 }
Exemple #19
0
 new float SplitViewController(MGSplitViewController svc, float proposedPosition, SizeF viewSize)
 {
     return(proposedPosition);
 }
Exemple #20
0
 public void SetSplitViewController(MGSplitViewController controller)
 {
     if (controller != _splitViewController) {
         _splitViewController = controller;
         SetNeedsDisplay();
     }
 }