Beispiel #1
0
        private void Close_Click(object sender, EventArgs e)
        {
            int i     = 0;
            int width = -1;

            for (i = 0; i <= Tabs.Count - 1; i++)
            {
                if (object.ReferenceEquals(Tabs[i].Content, DockPane.ActiveContent))
                {
                    width = GetTabRectangle(i).Width;
                    break; // TODO: might not be correct. Was : Exit For
                }
            }
            DockPane.CloseActiveContent();
            if (width > 0 && Tabs.Count > 0 && GetTabRectangle(0).X < 0)
            {
                OffsetX += Math.Min(width, Math.Abs(GetTabRectangle(0).X)) + 4;
                OnRefreshChanges();
            }
        }
 private void Close_Click(object sender, EventArgs e)
 {
     DockPane.CloseActiveContent();
 }