19 references to CaptionButton
System.Windows.Forms (7)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (5)
684
buttonToUse = (int)
CaptionButton
.Close;
690
buttonToUse = (int)
CaptionButton
.Minimize;
695
buttonToUse = (int)
CaptionButton
.Restore;
699
buttonToUse = (int)
CaptionButton
.Maximize;
711
ControlPaint.DrawCaptionButton(g, new Rectangle(Point.Empty, image.Size), (
CaptionButton
)buttonToUse, ButtonState.Flat);
System\Windows\Forms\Rendering\ControlPaint.cs (2)
1202
CaptionButton
button,
1215
CaptionButton
button,
System.Windows.Forms.Tests (12)
System\Windows\Forms\ControlPaintTests.cs (12)
893
foreach (
CaptionButton
button in Enum.GetValues(typeof(
CaptionButton
)))
907
public void ControlPaint_DrawCaptionButton_InvokeGraphicsRectangleButtonState_Success(Rectangle rectangle,
CaptionButton
button, ButtonState state)
919
public void ControlPaint_DrawCaptionButton_InvokeGraphicsIntIntIntIntButtonState_Success(Rectangle rectangle,
CaptionButton
button, ButtonState state)
934
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawCaptionButton(null, new Rectangle(1, 2, 3, 4),
CaptionButton
.Close, state));
935
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawCaptionButton(null, 1, 2, 3, 4,
CaptionButton
.Close, state));
948
Assert.Throws<ArgumentException>(() => ControlPaint.DrawCaptionButton(graphics, new Rectangle(0, 0, width, height),
CaptionButton
.Close, state));
949
Assert.Throws<ArgumentException>(() => ControlPaint.DrawCaptionButton(graphics, 0, 0, width, height,
CaptionButton
.Close, state));
959
Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawCaptionButton(graphics, new Rectangle(0, 0, -3, 4),
CaptionButton
.Close, state));
960
Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawCaptionButton(graphics, 0, 0, -3, 4,
CaptionButton
.Close, state));
970
Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawCaptionButton(graphics, new Rectangle(0, 0, 3, -4),
CaptionButton
.Close, state));
971
Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawCaptionButton(graphics, 0, 0, 3, -4,
CaptionButton
.Close, state));