protected override void DrawCloseButton(TabItemPaintEventArgs e, Rectangle rect) { Image image = Properties.Resources.taskbar_close_button; UIStatusImage img = UIStatusImage.FromVertical(image, new UIControlStatus[] { UIControlStatus.Normal, UIControlStatus.Hover, UIControlStatus.Selected, UIControlStatus.InactivedHover, UIControlStatus.Inactived, UIControlStatus.Disabled }); var bs = e.CloseButtonStatus; if (!e.Selected) { if (bs == UIControlStatus.Hover || bs == UIControlStatus.Selected) { bs = UIControlStatus.InactivedHover; } else { bs = UIControlStatus.Inactived; } } img.Draw(e.Graphics, bs, rect); }
void PaintItemCloseButton(PaintEventArgs e, ThumbItem item) { if (item != HoverObject.Item) { return; } Image image = Properties.Resources.taskbar_close_button; UIStatusImage img = UIStatusImage.FromVertical(image, new UIControlStatus[] { UIControlStatus.Normal, UIControlStatus.Hover, UIControlStatus.Selected, UIControlStatus.InactivedHover, UIControlStatus.Inactived, UIControlStatus.Disabled }); var rect = GetItemCloseButtonRectangle(item); var bs = UIControlStatus.Normal; if (PressedObject.Item == item && PressedObject.IsCloseButton) { bs = UIControlStatus.Selected; } else if (HoverObject.Item == item && HoverObject.IsCloseButton) { bs = UIControlStatus.Hover; } img.Draw(e.Graphics, bs, rect); }