23 references to Bounds
System.Windows.Forms (5)
System\Windows\Forms\ContextMenuStrip.cs (1)
98
Rectangle screenBounds = Screen.FromRectangle(bounds).
Bounds
;
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
73
return ConstrainToBounds(Screen.FromRectangle(bounds).
Bounds
, bounds);
System\Windows\Forms\Screen.cs (3)
298
public static Rectangle GetBounds(Point pt) => FromPoint(pt).
Bounds
;
303
public static Rectangle GetBounds(Rectangle rect) => FromRectangle(rect).
Bounds
;
308
public static Rectangle GetBounds(Control ctl) => FromControl(ctl).
Bounds
;
System.Windows.Forms.Tests (14)
System\Windows\Forms\ScreenTests.cs (14)
144
Assert.Equal(screen.
Bounds
, Screen.GetBounds(control));
152
Assert.Equal(screen.
Bounds
, Screen.GetBounds(point));
160
Assert.Equal(screen.
Bounds
, Screen.GetBounds(rectangle));
203
Assert.Equal($"Screen[Bounds={screen.
Bounds
} WorkingArea={screen.WorkingArea} Primary=True DeviceName={screen.DeviceName}", screen.ToString());
209
Assert.NotEqual(0, screen.
Bounds
.Width);
210
Assert.NotEqual(0, screen.
Bounds
.Height);
213
Assert.InRange(screen.WorkingArea.Width, 0, screen.
Bounds
.Width);
214
Assert.InRange(screen.WorkingArea.Height, 0, screen.
Bounds
.Height);
215
Assert.InRange(screen.WorkingArea.X, screen.
Bounds
.X, screen.
Bounds
.X + screen.
Bounds
.Width);
216
Assert.InRange(screen.WorkingArea.Y, screen.
Bounds
.Y, screen.
Bounds
.Y + screen.
Bounds
.Width);
System.Windows.Forms.UI.IntegrationTests (4)
Infra\ScreenshotService.cs (4)
52
int width = primaryScreen.
Bounds
.Width;
53
int height = primaryScreen.
Bounds
.Height;
66
sourceX: primaryScreen.
Bounds
.X,
67
sourceY: primaryScreen.
Bounds
.Y,