69 references to PictureBoxSizeMode
Accessibility_Core_App (1)
CommonControl2.Designer.cs (1)
83
this.pictureBox1.SizeMode = System.Windows.Forms.
PictureBoxSizeMode
.StretchImage;
PresentationUI (1)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (1)
486
this._iconPictureBox.SizeMode = System.Windows.Forms.
PictureBoxSizeMode
.CenterImage;
System.Windows.Forms (19)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (17)
45
private
PictureBoxSizeMode
_sizeMode =
PictureBoxSizeMode
.Normal;
342
private Rectangle ImageRectangleFromSizeMode(
PictureBoxSizeMode
mode)
349
case
PictureBoxSizeMode
.Normal:
350
case
PictureBoxSizeMode
.AutoSize:
355
case
PictureBoxSizeMode
.StretchImage:
359
case
PictureBoxSizeMode
.CenterImage:
366
case
PictureBoxSizeMode
.Zoom:
819
[DefaultValue(
PictureBoxSizeMode
.Normal)]
824
public
PictureBoxSizeMode
SizeMode
833
if (value ==
PictureBoxSizeMode
.AutoSize)
839
if (value !=
PictureBoxSizeMode
.AutoSize)
962
if (_sizeMode ==
PictureBoxSizeMode
.AutoSize)
1134
? ImageRectangleFromSizeMode(
PictureBoxSizeMode
.CenterImage)
1162
if (_sizeMode ==
PictureBoxSizeMode
.Zoom
1163
|| _sizeMode ==
PictureBoxSizeMode
.StretchImage
1164
|| _sizeMode ==
PictureBoxSizeMode
.CenterImage
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
139
SizeMode =
PictureBoxSizeMode
.CenterImage,
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
258
_pictureBox.SizeMode =
PictureBoxSizeMode
.StretchImage;
System.Windows.Forms.Design (6)
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
176
SizeMode =
PictureBoxSizeMode
.CenterImage,
301
SizeMode =
PictureBoxSizeMode
.CenterImage,
System\Windows\Forms\Design\PictureBoxActionList.cs (1)
21
public
PictureBoxSizeMode
SizeMode
System\Windows\Forms\Design\PictureBoxDesigner.cs (3)
87
PictureBoxSizeMode
sizeMode =
PictureBoxSizeMode
.Normal;
95
if (sizeMode ==
PictureBoxSizeMode
.AutoSize)
System.Windows.Forms.Design.Tests (4)
System\Windows\Forms\Design\PictureBoxActionListTests.cs (4)
15
using PictureBox pictureBox = new() { SizeMode =
PictureBoxSizeMode
.StretchImage };
20
actionList.SizeMode.Should().Be(
PictureBoxSizeMode
.StretchImage);
31
SizeMode =
PictureBoxSizeMode
.Zoom
34
pictureBox.SizeMode.Should().Be(
PictureBoxSizeMode
.Zoom);
System.Windows.Forms.Tests (37)
System\Windows\Forms\PictureBoxTests.cs (37)
100
Assert.Equal(
PictureBoxSizeMode
.Normal, control.SizeMode);
1279
yield return new object[] {
PictureBoxSizeMode
.Normal, false };
1280
yield return new object[] {
PictureBoxSizeMode
.StretchImage, false };
1281
yield return new object[] {
PictureBoxSizeMode
.AutoSize, true };
1282
yield return new object[] {
PictureBoxSizeMode
.CenterImage, false };
1283
yield return new object[] {
PictureBoxSizeMode
.Zoom, false };
1288
public void PictureBox_SizeMode_Set_GetReturnsExpected(
PictureBoxSizeMode
value, bool expectedAutoSize)
1307
public void PictureBox_SizeMode_SetWithHandle_GetReturnsExpected(
PictureBoxSizeMode
value, bool expectedAutoSize)
1329
SizeMode =
PictureBoxSizeMode
.Normal
1336
pictureBox.SizeMode =
PictureBoxSizeMode
.StretchImage;
1337
Assert.Equal(
PictureBoxSizeMode
.StretchImage, pictureBox.SizeMode);
1341
pictureBox.SizeMode =
PictureBoxSizeMode
.StretchImage;
1342
Assert.Equal(
PictureBoxSizeMode
.StretchImage, pictureBox.SizeMode);
1351
SizeMode =
PictureBoxSizeMode
.Normal
1363
pictureBox.SizeMode =
PictureBoxSizeMode
.StretchImage;
1364
Assert.Equal(
PictureBoxSizeMode
.StretchImage, pictureBox.SizeMode);
1368
pictureBox.SizeMode =
PictureBoxSizeMode
.StretchImage;
1369
Assert.Equal(
PictureBoxSizeMode
.StretchImage, pictureBox.SizeMode);
1373
pictureBox.SizeMode =
PictureBoxSizeMode
.Normal;
1374
Assert.Equal(
PictureBoxSizeMode
.Normal, pictureBox.SizeMode);
1379
pictureBox.SizeMode =
PictureBoxSizeMode
.StretchImage;
1380
Assert.Equal(
PictureBoxSizeMode
.StretchImage, pictureBox.SizeMode);
1385
[InvalidEnumData<
PictureBoxSizeMode
>]
1386
public void PictureBox_SizeMode_SetInvalid_ThrowsInvalidEnumArgumentException(
PictureBoxSizeMode
value)
2485
foreach (
PictureBoxSizeMode
sizeMode in Enum.GetValues(typeof(
PictureBoxSizeMode
)))
2494
public void PictureBox_OnPaint_InvokeWithValidImage_CallsLoad(
PictureBoxSizeMode
sizeMode, PaintEventArgs eventArgs)
2510
public void PictureBox_OnPaint_InvokeWithValidImageLocationWaitOnLoadTrue_CallsLoad(
PictureBoxSizeMode
sizeMode, PaintEventArgs eventArgs)
2556
foreach (
PictureBoxSizeMode
sizeMode in Enum.GetValues(typeof(
PictureBoxSizeMode
)))
2566
public void PictureBox_OnPaint_InvokeWithInvalidImageLocationWaitOnLoadTrue_CallsLoad(
PictureBoxSizeMode
sizeMode, string imageLocation, PaintEventArgs eventArgs)
2728
[InlineData(
PictureBoxSizeMode
.Normal, 0)]
2729
[InlineData(
PictureBoxSizeMode
.StretchImage, 1)]
2730
[InlineData(
PictureBoxSizeMode
.AutoSize, 0)]
2731
[InlineData(
PictureBoxSizeMode
.CenterImage, 1)]
2732
[InlineData(
PictureBoxSizeMode
.Zoom, 1)]
2733
public void PictureBox_OnResize_Invoke_CallsInvalidate(
PictureBoxSizeMode
sizeMode, int expectedInvalidatedCallCount)
WinFormsControlsTest (1)
PictureBoxes.Designer.cs (1)
49
this.pictureBox1.SizeMode = System.Windows.Forms.
PictureBoxSizeMode
.StretchImage;