Example #1
0
 void TabPage_TextChanged(object sender, EventArgs e)
 {
     if (sender is Control)
     {
         TabItem ti = TabBar.GetItemByTag(sender);
         if (ti != null)
         {
             ti.Text = ((Control)sender).Text;
         }
     }
 }
Example #2
0
        void TabPages_ItemRemoved(object sender, XListEventArgs <Control> e)
        {
            if (e.Item != null)
            {
                TabItem item = TabBar.GetItemByTag(e.Item);
                if (item != null)
                {
                    TabBar.Items.Remove(item);
                }

                //
                if (Controls.Contains(e.Item))
                {
                    Controls.Remove(e.Item);
                }
                SelectNextPage(e.Index);
            }
        }