示例#1
0
 public void AddItem(TabViewModel sender)
 {
     TabViewModel newTabItem = new TabViewModel(this);
     newTabItem.Header = "New Tab";
     newTabItem.IsSelected = true;
     if (sender != null)
     {
         int insertIndex = this.Tabs.IndexOf(sender) + 1;
         this.Tabs.Insert(insertIndex, newTabItem);
     }
     else
     {
         this.Tabs.Add(newTabItem);
     }
 }
        public void AddItem(TabViewModel sender)
        {
            TabViewModel newTabItem = new TabViewModel(this);

            newTabItem.Header     = "New Tab";
            newTabItem.IsSelected = true;
            if (sender != null)
            {
                int insertIndex = this.Tabs.IndexOf(sender) + 1;
                this.Tabs.Insert(insertIndex, newTabItem);
            }
            else
            {
                this.Tabs.Add(newTabItem);
            }
        }
示例#3
0
 public void RemoveItem(TabViewModel tabItem)
 {
     this.Tabs.Remove(tabItem);
     tabItem.Dispose();
 }
 public void RemoveItem(TabViewModel tabItem)
 {
     this.Tabs.Remove(tabItem);
     tabItem.Dispose();
 }