public void TintColor() { using (UITabBar tb = new UITabBar()) { // TintColor is inherited in iOS7 so it won't be null by default if (TestRuntime.CheckSystemVersion(PlatformName.iOS, 7, 0, throwIfOtherPlatform: false)) { Assert.NotNull(tb.TintColor, "1"); } else { Assert.Null(tb.TintColor, "1"); } tb.TintColor = UIColor.White; Assert.That(tb.TintColor, Is.EqualTo(UIColor.White), "2"); tb.TintColor = null; if (TestRuntime.IsTVOS) { // we only care that setting `null` gives us back some default OS value Assert.NotNull(tb.TintColor, "3"); } else if (TestRuntime.CheckSystemVersion(PlatformName.iOS, 7, 0, throwIfOtherPlatform: false)) { Assert.That(tb.TintColor, Is.Not.EqualTo(UIColor.White), "3"); } else { Assert.Null(tb.TintColor, "3"); } } }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { var targetViewController = ViewControllers.Single(vc => vc.TabBarItem == item); if (targetViewController is UINavigationController navigationController && navigationController.TopViewController is ReportsViewController) { ViewModel.StartReportsStopwatch(); } if (targetViewController == SelectedViewController && tryGetScrollableController() is IScrollableToTop scrollable) { scrollable.ScrollToTop(); } UIViewController tryGetScrollableController() { if (targetViewController is IScrollableToTop) { return(targetViewController); } if (targetViewController is UINavigationController nav) { return(nav.TopViewController); } return(null); } }
public override void ViewDidLoad() { base.ViewDidLoad(); //Initialize the tab bar items tabBarItems = new List <UITabBarItem> (); tracker = new VisualElementTracker(this); events = new EventTracker(this); events.LoadEvents(View); scrollView = new UIScrollView { ShowsHorizontalScrollIndicator = false }; scrollView.DecelerationEnded += OnDecelerationEnded; View.AddSubview(scrollView); int num = 0; foreach (var page in TabbedCarousel.Children) { InsertPage(page, num++); } PositionChildren(); TabbedCarousel.PropertyChanged += OnPropertyChanged; TabbedCarousel.PagesChanged += OnPagesChanged; //Initialized the tab bar view tabBarView = new UITabBar { Items = tabBarItems.ToArray(), Translucent = true }; View.AddSubview(tabBarView); }
protected override void SetupSubviews() { base.SetupSubviews(); BackgroundColor = AppColors.WhiteColor; VacationsTableView = new UITableView(); VacationsTableView.RegisterClassForCellReuse( typeof(VacationItemViewCell), VacationItemViewCell.CellId); VacationsTableView.RegisterClassForHeaderFooterViewReuse( typeof(VacationTableFooterViewCell), VacationTableFooterViewCell.CellId); VacationsTableView.RegisterClassForHeaderFooterViewReuse( typeof(VacationTableHeaderViewCell), VacationTableHeaderViewCell.CellId); VacationsTableView.RefreshControl = new UIRefreshControl(); VacationsTabBar = new UITabBar(); //VacationsTableView.AllowsSelection = true; VacationsTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; }
//DISPARADO SEMPRE QUE É FEITO UMA TROCA DE TAB public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { int tabPosition = Convert.ToInt32(item.Tag); ViewModel.ItemIndex = tabPosition; ViewModel.clearStackPreferencesTabCommand.Execute(null); }
public void UITabBarSpringLoadTest() { var tabBar = new UITabBar(); tabBar.SpringLoaded = true; Assert.IsTrue(tabBar.SpringLoaded); }
void ReleaseDesignerOutlets () { if (btnTabBar != null) { btnTabBar.Dispose (); btnTabBar = null; } }
public SettingsViewController(UIViewController parentViewController, uint joinNumber, string title) : base(parentViewController, joinNumber, title, TimeSpan.Zero) { var ui = UIController as UIControllerWithSmartObjects; _autoModeButtons = new ButtonCollection { { 1, new UIButton(this, Digitals.AutoModeRoom1Btn) }, { 2, new UIButton(this, Digitals.AutoModeRoom2Btn) }, }; var tabBar = new UITabBar(ui, ui.Device.SmartObjects[Joins.SmartObjects.AudioPresetsTabs]); _roomModeTabButtons = new ButtonCollection(tabBar); _roomModeLayoutButtons = new ButtonCollection { { 1, new UIButton(this, Digitals.RoomModeLayout1Btn) }, { 2, new UIButton(this, Digitals.RoomModeLayout2Btn) }, { 3, new UIButton(this, Digitals.RoomModeLayout3Btn) }, }; _saveRoomModeButton = new UIButton(this, Digitals.RoomModeSaveBtn) { EnableJoin = Device.BooleanInput[Digitals.RoomModeChangeEnable] }; _revertRoomModeButton = new UIButton(this, Digitals.RoomModeRevertBtn) { EnableJoin = Device.BooleanInput[Digitals.RoomModeChangeEnable] }; _codec1DualBtn = new UIButton(this, Digitals.Codec1DualModeBtn); }
public CameraControlViewController(UIViewController parentViewController) : base(parentViewController, Digitals.SubPageTechCameras, "Camera Control", TimeSpan.Zero) { var tabs = new UITabBar((UIControllerWithSmartObjects)parentViewController.UIController, Device.SmartObjects[Joins.SmartObjects.CamTrackingProcessorSelectTabs]); _processorSelectButtons = new ButtonCollection(tabs); _cameraButtons = new ButtonCollection { { Digitals.CameraUp, new UIButton(this, Digitals.CameraUp) }, { Digitals.CameraDown, new UIButton(this, Digitals.CameraDown) }, { Digitals.CameraLeft, new UIButton(this, Digitals.CameraLeft) }, { Digitals.CameraRight, new UIButton(this, Digitals.CameraRight) }, { Digitals.CameraZoomIn, new UIButton(this, Digitals.CameraZoomIn) }, { Digitals.CameraZoomOut, new UIButton(this, Digitals.CameraZoomOut) }, { Digitals.CameraTrackingOff, new UIButton(this, Digitals.CameraTrackingOff) }, { Digitals.CameraTrackingOn, new UIButton(this, Digitals.CameraTrackingOn) }, { Digitals.CameraRecordBtn, new UIButton(this, Digitals.CameraRecordBtn) }, { Digitals.CameraRecordStopBtn, new UIButton(this, Digitals.CameraRecordStopBtn) }, { Digitals.CameraStreamBtn, new UIButton(this, Digitals.CameraStreamBtn) }, }; _layoutsList = new UIDynamicButtonList( (UIControllerWithSmartObjects)parentViewController.UIController, Device.SmartObjects[Joins.SmartObjects.CameraLayoutsList]); _layoutsListButtons = new ButtonCollection(_layoutsList); _roomConfigsList = new UIDynamicButtonList( (UIControllerWithSmartObjects)parentViewController.UIController, Device.SmartObjects[Joins.SmartObjects.CameraRoomConfigsList]); _roomConfigsListButtons = new ButtonCollection(_roomConfigsList); _cameraSelectList = new UIDynamicButtonList( (UIControllerWithSmartObjects)parentViewController.UIController, Device.SmartObjects[Joins.SmartObjects.CameraSelectList]); _cameraSelectListButtons = new ButtonCollection(_cameraSelectList); _autoSwitchEnableButton = new UIButton(this, Digitals.CameraAutoTracking); }
public void TintColor() { using (UITabBar tb = new UITabBar()) { // TintColor is inherited in iOS7 so it won't be null by default if (TestRuntime.CheckSystemAndSDKVersion(7, 0)) { Assert.NotNull(tb.TintColor, "1"); } else { Assert.Null(tb.TintColor, "1"); } tb.TintColor = UIColor.White; Assert.That(tb.TintColor, Is.EqualTo(UIColor.White), "2"); tb.TintColor = null; if (TestRuntime.IsTVOS) { Assert.That(tb.TintColor, Is.EqualTo(UIColor.White), "3"); } else if (TestRuntime.CheckSystemAndSDKVersion(7, 0)) { Assert.That(tb.TintColor, Is.Not.EqualTo(UIColor.White), "3"); } else { Assert.Null(tb.TintColor, "3"); } } }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { //send data tabcontrol var mainTabPage = Element as TabControl; mainTabPage.sendReset(item.Title); }
//Tab settings manager private void ManageTabBar(UITabBarController RootTab) { UITabBar tabBar = RootTab.TabBar; UITabBarItem t0 = tabBar.Items[0]; t0.Title = "Shop"; UIImage shop = UIImage.FromFile("shop.png"); shop = ResizeImage(shop, 32, 32); t0.Image = shop; t0.SelectedImage = shop; UITabBarItem t1 = tabBar.Items[1]; //t1 = new UITabBarItem(); t1.Title = "My Hangouts"; UIImage Taste = UIImage.FromFile("taste.png"); Taste = ResizeImage(Taste, 35, 35); t1.Image = Taste; t1.SelectedImage = Taste; UITabBarItem t2 = tabBar.Items[2]; t2.Title = "Explore"; UIImage explore = UIImage.FromFile("explore.png"); explore = ResizeImage(explore, 35, 35); t2.Image = explore; t2.SelectedImage = explore; t2.Enabled = true; //RootTab[2].RemoveFromParentViewController(); }
private void ManageTabBar(UITabBarController RootTab) { UITabBar tabBar = RootTab.TabBar; //UITabBar.Appearance.BackgroundColor = UIColor.Red; //UITabBar.Appearance.BackgroundImage = UIImage.FromFile("Star4.png"); UITabBarItem t0 = tabBar.Items[0]; t0.Title = "Shop"; UIImage shop = UIImage.FromFile("Shop.png"); shop = ResizeImage(shop, 32, 32); t0.Image = shop; t0.SelectedImage = shop; UITabBarItem t1 = tabBar.Items[1]; //t1 = new UITabBarItem(); t1.Title = "Taste"; UIImage Taste = UIImage.FromFile("taste.png"); Taste = ResizeImage(Taste, 35, 35); t1.Image = Taste; t1.SelectedImage = Taste; UITabBarItem t2 = tabBar.Items[2]; t2.Title = "Explore"; UIImage explore = UIImage.FromFile("explore.png"); explore = ResizeImage(explore, 35, 35); t2.Image = explore; t2.SelectedImage = explore; }
void ReleaseDesignerOutlets () { if (tabbarMain != null) { tabbarMain.Dispose (); tabbarMain = null; } }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { var targetViewController = ViewControllers.Single(vc => vc.TabBarItem == item); if (targetViewController == SelectedViewController && tryGetScrollableController() is IScrollableToTop scrollable) { scrollable.ScrollToTop(); } else if (targetViewController is ReactiveNavigationController navigationController) { if (navigationController.TopViewController is IReactiveViewController reactiveViewController) { reactiveViewController.DismissFromNavigationController(); } } UIViewController tryGetScrollableController() { if (targetViewController is IScrollableToTop) { return(targetViewController); } if (targetViewController is UINavigationController nav) { return(nav.TopViewController); } return(null); } }
void ReleaseDesignerOutlets() { if (btnTabBar != null) { btnTabBar.Dispose(); btnTabBar = null; } }
public override void ShowFromTabBar(UITabBar view) { Prepare(); if (_ActualActionSheet != null) { _ActualActionSheet.ShowFromTabBar(view); } }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { if (_previousSelectedItem == item && Element is TabsPage tabsPage) { tabsPage.OnPageReselected(); } _previousSelectedItem = item; }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { var selectedIndex = Array.IndexOf(tabbar.Items, item); PageRenderer.SelectedIndex = selectedIndex; PageRenderer.TabbedCarousel.CurrentPage = PageRenderer.TabbedCarousel.Children [selectedIndex]; tabbar.BackgroundColor = PageRenderer.TabbedCarousel.Children [selectedIndex].BackgroundColor.ToUIColor(); }
public void InitWithFrame() { RectangleF frame = new RectangleF(10, 10, 100, 100); using (UITabBar tb = new UITabBar(frame)) { Assert.That(tb.Frame, Is.EqualTo(frame), "Frame"); } }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { ResizeIcons(); item.SetTitleTextAttributes(new UITextAttributes() { Font = UIFont.PreferredCaption1 }, UIControlState.Normal); }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { var selectedVc = this.ViewControllers.FirstOrDefault(vc => vc.TabBarItem == item); if (selectedVc == null) { return; } this.Title = selectedVc.Title; }
public void UpdateLayout(UITabBarController controller) { UITabBar myTabBar = controller.TabBar; foreach (var barItem in myTabBar.Items) { barItem.ImageInsets = new UIEdgeInsets(8, 0, 0, 0); //barItem.TitlePositionAdjustment = new UIOffset(10, 0); } }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { var targetViewController = ViewControllers.Single(vc => vc.TabBarItem == item); if (targetViewController is UINavigationController navigationController && navigationController.TopViewController is ReportsViewController) { ViewModel.StartReportsStopwatch(); } }
public AudioFadersViewController(UIViewController parentViewController) : base(parentViewController, Digitals.SubPageTechAudioFaders, string.Empty, TimeSpan.Zero) { var ui = parentViewController.UIController as UIControllerWithSmartObjects; _faders = new AudioFaderList(ui, ui.Device.SmartObjects[Joins.SmartObjects.AudioFaderList]); var tabs = new UITabBar(ui, ui.Device.SmartObjects[Joins.SmartObjects.AudioFaderListTabs]); _tabButtonsGroups = new ButtonCollection(tabs); tabs = new UITabBar(ui, ui.Device.SmartObjects[Joins.SmartObjects.AudioFaderListTabsFilter]); _tabButtonsFilter = new ButtonCollection(tabs); }
public void SelectionIndicatorImage() { using (UIImage i = new UIImage()) using (UITabBar tb = new UITabBar()) { Assert.Null(tb.SelectionIndicatorImage, "1"); tb.SelectionIndicatorImage = i; Assert.NotNull(tb.SelectionIndicatorImage, "2"); tb.SelectionIndicatorImage = null; Assert.Null(tb.SelectionIndicatorImage, "3"); } }
public void BackgroundImage() { using (UIImage i = new UIImage()) using (UITabBar tb = new UITabBar()) { Assert.Null(tb.BackgroundImage, "1"); tb.BackgroundImage = i; Assert.NotNull(tb.BackgroundImage, "2"); tb.BackgroundImage = null; Assert.Null(tb.BackgroundImage, "3"); } }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { int index = System.Array.IndexOf(tabbar.Items, item); if (index == 0) { this.viewController.SwitchToUser1(); } else { this.viewController.SwitchToUser2(); } }
public void CreateTabBar() { CreateContent(); string strPrefab = "Common/Prefab/TabBar/UITabBar"; GameObject obj = PrefabCache.main.Load(strPrefab); uiTabBarPrefab = obj.GetComponent <UITabBar>(); uiTabBar = (UITabBar)GameObject.Instantiate(uiTabBarPrefab); uiTabBar.transform.parent = objController.transform; uiTabBar.callbackClick = OnUITabBarClick; UIViewController.ClonePrefabRectTransform(uiTabBarPrefab.gameObject, uiTabBar.gameObject); }
public static Task <DropDownListSelection <T> > Show <T>( UITabBar containerView, UITabBarItem anchorView, UITableViewCellStyle itemStyle, IEnumerable <T> items, Func <T, GenericCellDescriptor> itemDescriber, string dropDownTitle = null, UITableViewStyle headerStyle = UITableViewStyle.Plain, UIPopoverArrowDirection arrowDirection = UIPopoverArrowDirection.Up, CGSize?fitSize = null ) { return(ShowInternal(containerView, anchorView, itemStyle, headerStyle, items, itemDescriber, dropDownTitle, arrowDirection, fitSize)); }
public static Task <DropDownListSelection <TItem> > Show <TSection, TItem>( UITabBar containerView, UITabBarItem anchorView, UITableViewCellStyle itemStyle, IEnumerable <TSection> sections, Func <TSection, GenericTableViewSection <TItem> > sectionDescriber, Func <TItem, GenericCellDescriptor> itemDescriber, UITableViewStyle headerStyle = UITableViewStyle.Plain, UIPopoverArrowDirection arrowDirection = UIPopoverArrowDirection.Up, CGSize?fitSize = null ) where TSection : IEnumerable <TItem> { return(ShowInternal(containerView, anchorView, itemStyle, headerStyle, sections, sectionDescriber, itemDescriber, arrowDirection, fitSize)); }
public ScrollablePageDataSource(List <IPageViewControllerIndex> steps, UITabBar tabBar) { if (steps == null || steps.Count == 0) { throw new ArgumentNullException(nameof(steps)); } TabBar = tabBar; _steps = steps; for (int i = 0; i < steps.Count; i++) { _steps[i].Index = i; } }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { var controller = ViewControllers.SingleOrDefault(x => x.TabBarItem == item); if (controller != null) { if (controller is TopMoviesNavigationController) { var selectedController = (TopMoviesNavigationController)controller; if(!selectedController.IsCategorySelected) { this.SetMenuNavigationButton(); } } } }
protected override void Dispose ( bool disposing ) { if ( disposing && !disposed ) { TabbedCarousel.PropertyChanged -= OnPropertyChanged; SetRenderer ( Element , null ); Clear (); if ( scrollView != null ) { scrollView.DecelerationEnded -= OnDecelerationEnded; scrollView.RemoveFromSuperview (); scrollView = null; } if ( appeared ) { appeared = false; SendDisappearing (); } if ( tabBarView != null ) { if ( tabBarView.Delegate != null ) { tabBarView.Delegate.Dispose (); tabBarView.Delegate = null; } tabBarView.RemoveFromSuperview (); tabBarView = null; } if ( events != null ) { events.Dispose (); events = null; } if ( tracker != null ) { tracker.Dispose (); tracker = null; } Element = null; disposed = true; } base.Dispose ( disposing ); }
public override void ViewDidLoad () { base.ViewDidLoad (); //Initialize the tab bar items tabBarItems = new List <UITabBarItem> (); tracker = new VisualElementTracker ( this ); events = new EventTracker ( this ); events.LoadEvents ( View ); scrollView = new UIScrollView { ShowsHorizontalScrollIndicator = false }; scrollView.DecelerationEnded += OnDecelerationEnded; View.AddSubview ( scrollView ); int num = 0; foreach ( var page in TabbedCarousel.Children ) { InsertPage ( page , num++ ); } PositionChildren (); TabbedCarousel.PropertyChanged += OnPropertyChanged; TabbedCarousel.PagesChanged += OnPagesChanged; //Initialized the tab bar view tabBarView = new UITabBar { Items = tabBarItems.ToArray () , Translucent = true }; View.AddSubview ( tabBarView ); }
public override void ItemSelected ( UITabBar tabbar , UITabBarItem item ) { var selectedIndex = Array.IndexOf ( tabbar.Items , item ); PageRenderer.SelectedIndex = selectedIndex; PageRenderer.TabbedCarousel.CurrentPage = PageRenderer.TabbedCarousel.Children [ selectedIndex ]; tabbar.BackgroundColor = PageRenderer.TabbedCarousel.Children [ selectedIndex ].BackgroundColor.ToUIColor (); }
public override void ItemSelected(UITabBar tabbar, UITabBarItem item) { //base.ItemSelected(tabbar, item); SetMenuNavigationButton(); }
public override void ShowFromTabBar(UITabBar view) { Prepare(); _ActualActionSheet.ShowFromTabBar(view); }
public override void ItemSelected (UITabBar tabbar, UITabBarItem item) { var userDefaults = NSUserDefaults.StandardUserDefaults; userDefaults [StartingTabIndexKey] = new NSNumber ((nint)Array.IndexOf (tabbar.Items, item)); }
public override void WillBeginCustomizingItems (UITabBar tabbar, UITabBarItem[] items) { base.WillBeginCustomizingItems (tabbar, items); Console.WriteLine (this.Tabbed); }
public ActionSheetPicker(UIView owner, UITabBar tabbar) : this(owner) { _tabbar = tabbar; }
/// <summary> /// Apply this theme to a specific view. /// </summary> public static void Apply(UITabBar view, string options = null) { }
/// <summary> /// Apply this theme to all views with the given appearance. /// </summary> public static void Apply(UITabBar.UITabBarAppearance appearance, string options = null) { }