Example #1
0
        private void RemoveTabForItem(KNTabViewItem item)
        {
            if (itemToTabCache.ContainsKey(item)) {

                KNTabViewTab tab = itemToTabCache[item];
                this.Children.Remove(tab);
                if (tab.RepresentedObject.ViewController != null) {
                    tab.RepresentedObject.ViewController.ParentViewController = null;
                }
                tab.RepresentedObject = null;
                itemToTabCache.Remove(item);
            }
        }
Example #2
0
 private void CreateTabForItem(KNTabViewItem item)
 {
     KNTabViewTab tab = new KNTabViewTab();
     this.Children.Add(tab);
     tab.RepresentedObject = item;
     if (tab.RepresentedObject.ViewController != null) {
         tab.RepresentedObject.ViewController.ParentViewController = ParentViewController;
     }
     tab.TabWasClicked += TabClicked;
     tab.TabMayWantNewSize += TabResized;
     itemToTabCache.Add(item, tab);
 }