Esempio n. 1
0
        internal void UpdateCloseButton(TabStripPanel owner)
        {
            if (!this.showCloseButton)
            {
                this.closeButton.Visibility = ElementVisibility.Collapsed;
                return;
            }

            this.closeButton.AngleTransform = 360F - this.AngleTransform;
            this.closeButton.Visibility     = ElementVisibility.Visible;

            if (owner == null)
            {
                return;
            }

            int offset = this.CloseButtonOffset;

            if (this.TextOrientation == Orientation.Vertical)
            {
                this.closeButton.Alignment = ContentAlignment.TopLeft;
            }
            else
            {
                this.closeButton.Alignment = ContentAlignment.TopRight;
            }
        }
Esempio n. 2
0
 public TabPanelCollection(TabStripPanel owner)
 {
     this.lastAccessedIndex = -1;
     if (owner == null)
     {
         throw new ArgumentNullException(nameof(owner));
     }
     this.owner = owner;
 }
Esempio n. 3
0
        private void OnCloseButtonClick(object sender, EventArgs e)
        {
            if (this.tabPanel == null)
            {
                return;
            }

            TabStripPanel strip = this.tabPanel.Parent as TabStripPanel;

            if (strip != null)
            {
                strip.OnTabCloseButtonClicked(this);
            }
        }
Esempio n. 4
0
 public ControlCollection(TabStripPanel owner)
     : base((Control)owner)
 {
     this.owner = owner;
 }
Esempio n. 5
0
 internal void UpdateTabButtoms(TabStripPanel owner)
 {
     this.UpdateCloseButton(owner);
     this.UpdatePinButton(owner);
 }