public TabBar(MXTouchContainer touchContainer) { Model = new Object(); // define view size View.Frame = new RectangleF (0, 20, 320, 460); // setup view controllers for each tab var navBarTint = UIColor.FromRGB(0, 63, 107); var rootTabBarCtrls = new List<UIViewController>(3); var navCtrl = new UINavigationController(); navCtrl.NavigationBar.TintColor = navBarTint; navCtrl.TabBarItem = new UITabBarItem("Contacts", UIImage.FromBundle("images/contacts.png"), 0); rootTabBarCtrls.Add(navCtrl); navCtrl = new UINavigationController(); navCtrl.NavigationBar.TintColor = navBarTint; navCtrl.TabBarItem = new UITabBarItem("Calendar", UIImage.FromBundle("images/cal.png"), 0); rootTabBarCtrls.Add(navCtrl); navCtrl = new UINavigationController(); navCtrl.NavigationBar.TintColor = navBarTint; navCtrl.TabBarItem = new UITabBarItem("Tasks", UIImage.FromBundle("images/filecab.png"), 0); rootTabBarCtrls.Add(navCtrl); SetViewControllers(rootTabBarCtrls.ToArray(), false); Delegate = new TabBarDelegate(); }
public static void Initialize(MXApplication theApp, UIApplicationDelegate appDelegate, UIWindow window) { // initialize the application and hold a reference for a bit MXTouchContainer thisContainer = new MXTouchContainer(theApp, appDelegate, window); Initialize(thisContainer); }
public override bool ShouldSelectViewController(UITabBarController tabBarController, UIViewController viewController) { UINavigationController navController = viewController as UINavigationController; System.Console.WriteLine("TabBarControllerDelegate:ShouldSelectViewController"); if (navController.ViewControllers.Length == 0) { int index = Array.IndexOf(tabBarController.ViewControllers, viewController); if (index >= 0) { Type viewType = _parent._viewGroup.Items[index].ViewType; MXViewPerspective viewPerspective = MXContainer.Instance.Views.GetViewPerspectiveForViewType(viewType); string pattern = MXContainer.Instance.App.NavigationMap.GetPatternForModelType(viewPerspective.ModelType); MXTouchContainer.Navigate(null, pattern); } } else { // do nothing, tab has a view, leave it for the contained view to figure out what needs // to be done } return(true); }
public static void Initialize(MXApplication theApp, UIApplicationDelegate appDelegate, UIWindow window) { // initialize the application and hold a reference for a bit MXTouchContainer thisContainer = new MXTouchContainer(theApp, appDelegate, window); MXContainer.InitializeContainer(thisContainer); thisContainer.StartApplication(); }
protected static void Initialize(MXTouchContainer container) { MXContainer.InitializeContainer(container); container.StartApplication(); }
public override void Redirect(string url) { MXTouchContainer.Navigate(null, url); CancelLoad = true; }