1 write to _resizeComponents
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
348
_resizeComponents
= new ResizeComponent[components.Count];
60 references to _resizeComponents
System.Windows.Forms.Design (60)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (60)
208
for (int i = 0; i <
_resizeComponents
.Length; i++)
210
_resizeComponents
[i].resizeBounds =
_resizeComponents
[i].resizeControl.Bounds;
213
components.Add(
_resizeComponents
[i].resizeControl);
218
if (designerHost.GetDesigner(
_resizeComponents
[i].resizeControl) is ControlDesigner designer)
220
_resizeComponents
[i].resizeRules = designer.SelectionRules;
224
Debug.Fail($"Initiating resize. Could not get the designer for {
_resizeComponents
[i].resizeControl}");
225
_resizeComponents
[i].resizeRules = SelectionRules.None;
237
if (
_resizeComponents
.Length == 1)
239
string name = TypeDescriptor.GetComponentName(
_resizeComponents
[0].resizeControl);
242
name =
_resizeComponents
[0].resizeControl.GetType().Name;
249
locString = string.Format(SR.BehaviorServiceResizeControls,
_resizeComponents
.Length);
261
else if (
_resizeComponents
.Length > 0)
264
if (
_resizeComponents
[0].resizeControl is Control control && control.Parent is not null)
351
_resizeComponents
[i].resizeControl = components[i];
378
for (int i = 0; !_captureLost && i <
_resizeComponents
.Length; i++)
380
Control control =
_resizeComponents
[i].resizeControl;
503
if (
_resizeComponents
is null ||
_resizeComponents
.Length == 0)
518
propWidth = TypeDescriptor.GetProperties(
_resizeComponents
[0].resizeControl)["Width"];
519
propHeight = TypeDescriptor.GetProperties(
_resizeComponents
[0].resizeControl)["Height"];
520
propTop = TypeDescriptor.GetProperties(
_resizeComponents
[0].resizeControl)["Top"];
521
propLeft = TypeDescriptor.GetProperties(
_resizeComponents
[0].resizeControl)["Left"];
545
Control targetControl =
_resizeComponents
[0].resizeControl;
618
Rectangle controlBounds = new(
_resizeComponents
[0].resizeBounds.X,
_resizeComponents
[0].resizeBounds.Y,
619
_resizeComponents
[0].resizeBounds.Width,
_resizeComponents
[0].resizeBounds.Height);
633
for (int i = 0; i <
_resizeComponents
.Length; i++)
635
Control control =
_resizeComponents
[i].resizeControl;
640
Rectangle baseBounds =
_resizeComponents
[i].resizeBounds;
665
SelectionRules resizeRules =
_resizeComponents
[i].resizeRules;
767
propWidth.SetValue(
_resizeComponents
[i].resizeControl, bounds.Width);
773
propHeight.SetValue(
_resizeComponents
[i].resizeControl, bounds.Height);
779
propLeft.SetValue(
_resizeComponents
[i].resizeControl, bounds.X);
785
propTop.SetValue(
_resizeComponents
[i].resizeControl, bounds.Y);
919
if (
_resizeComponents
is not null &&
_resizeComponents
.Length > 0)
924
PropertyDescriptor propWidth = TypeDescriptor.GetProperties(
_resizeComponents
[0].resizeControl)["Width"];
925
PropertyDescriptor propHeight = TypeDescriptor.GetProperties(
_resizeComponents
[0].resizeControl)["Height"];
926
PropertyDescriptor propTop = TypeDescriptor.GetProperties(
_resizeComponents
[0].resizeControl)["Top"];
927
PropertyDescriptor propLeft = TypeDescriptor.GetProperties(
_resizeComponents
[0].resizeControl)["Left"];
928
for (int i = 0; i <
_resizeComponents
.Length; i++)
930
if (propWidth is not null &&
_resizeComponents
[i].resizeControl.Width !=
_resizeComponents
[i].resizeBounds.Width)
932
propWidth.SetValue(
_resizeComponents
[i].resizeControl,
_resizeComponents
[i].resizeControl.Width);
935
if (propHeight is not null &&
_resizeComponents
[i].resizeControl.Height !=
_resizeComponents
[i].resizeBounds.Height)
937
propHeight.SetValue(
_resizeComponents
[i].resizeControl,
_resizeComponents
[i].resizeControl.Height);
940
if (propTop is not null &&
_resizeComponents
[i].resizeControl.Top !=
_resizeComponents
[i].resizeBounds.Y)
942
propTop.SetValue(
_resizeComponents
[i].resizeControl,
_resizeComponents
[i].resizeControl.Top);
945
if (propLeft is not null &&
_resizeComponents
[i].resizeControl.Left !=
_resizeComponents
[i].resizeBounds.X)
947
propLeft.SetValue(
_resizeComponents
[i].resizeControl,
_resizeComponents
[i].resizeControl.Left);
950
if (
_resizeComponents
[i].resizeControl == _primaryControl && _statusCommandUI is not null)