46 references to Width
System.Drawing.Common.Tests (31)
mono\System.Drawing\BitmapTests.cs (4)
1199
size = icon.
Width
;
1217
size = icon.
Width
;
1235
size = icon.
Width
;
1253
size = icon.
Width
;
System\Drawing\IconConverterTests.cs (4)
110
Assert.Equal(_icon.
Width
, newIcon.
Width
);
122
Assert.Equal(_icon.
Width
, newIcon.
Width
);
System\Drawing\IconTests.cs (22)
41
Assert.Equal(32, icon.
Width
);
71
Assert.Equal(expectedSize.Width, icon.
Width
);
81
Assert.Equal(expectedSize.Width, icon.
Width
);
99
Assert.Equal(32, icon.
Width
);
109
Assert.Equal(32, icon.
Width
);
126
Assert.Equal(expectedSize.Width, icon.
Width
);
137
Assert.Equal(expectedSize.Width, icon.
Width
);
224
Assert.Equal(expectedSize.Width, icon.
Width
);
236
Assert.Equal(expectedSize.Width, icon.
Width
);
254
Assert.Equal(32, icon.
Width
);
285
Assert.Equal(32, clone.
Width
);
297
Assert.Equal(SystemIcons.Hand.
Width
, clone.
Width
);
338
Assert.Equal(size, icon.
Width
);
380
Assert.Equal(32, icon.
Width
);
527
Assert.Equal(icon.
Width
, bitmap.Width);
565
Assert.Equal(icon.
Width
, bitmap.Width);
709
Assert.Throws<ObjectDisposedException>(() => icon.
Width
);
722
Assert.Equal(icon.
Width
, loaded.
Width
);
837
Assert.Equal(16, icon.
Width
);
852
Assert.Equal(256, icon.
Width
);
System\Drawing\SystemIconsTests.cs (1)
45
Assert.Equal(256, icon.
Width
);
System.Windows.Forms (7)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (6)
441
if (icoWidthAllowed <= 0 || ico!.
Width
== 0)
447
preferredSize = new Size(0, Math.Min(ico.Height, decimal.ToInt32((decimal)ico.Height * icoWidthAllowed / ico.
Width
)));
482
preferredSize = new Size(Math.Min(ico.
Width
, decimal.ToInt32((decimal)ico.
Width
* icoHeightAllowed / ico.Height)), 0);
499
preferredSize = new Size(ico.
Width
, ico.Height);
844
image is null ? icon!.
Width
: image.Width,
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
458
_provider.Icon = new Icon(icon, (int)(icon.
Width
* factor), (int)(icon.Height * factor));
System.Windows.Forms.Design (3)
System\Drawing\Design\IconEditor.cs (3)
120
if (icon.
Width
< rectangle.Width)
122
rectangle.X += (rectangle.Width - icon.
Width
) / 2;
123
rectangle.Width = icon.
Width
;
System.Windows.Forms.Tests (5)
System\Windows\Forms\ComponentModel\Com2Interop\COM2PictureConverterTests.cs (4)
83
Assert.Equal(icon.
Width
, errorIcon.
Width
);
103
Assert.Equal(bitmap.Width, errorIcon.
Width
);
149
Assert.Equal(exclamationIcon.
Width
, GdiHelper.HimetricToPixelX(width));
System\Windows\Forms\ErrorProviderTests.cs (1)
31
Assert.Equal(provider.Icon.
Width
, PInvokeCore.GetSystemMetrics(SYSTEM_METRICS_INDEX.SM_CXSMICON));