Implemented interface member:
property
Component
System.ComponentModel.Design.IDesigner.Component
387 references to Component
DesignSurface (1)
CustomControls\CustomButtonDesigner.cs (1)
16
new CustomButtonDesignerActionList(
Component
)
System.Windows.Forms.Design (359)
System\ComponentModel\Design\ComponentDesigner.cs (20)
83
return root ==
Component
? null : root;
99
_inheritanceAttribute = inheritanceService.GetInheritanceAttribute(
Component
);
186
/// Controls whether the default property of <see cref="
Component
"/> is automatically set
336
if (
Component
== comp)
356
ebs.ShowCode(
Component
, thisDefaultEvent);
410
PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(
Component
);
434
props.Add(prop.Name, new(prop,
Component
));
440
TypeDescriptor.Refresh(
Component
); // force TypeDescriptor to re-query us.
471
if (
Component
is IPersistComponentSettings)
477
if (!_settingsKeyExplicitlySet && (e.Component ==
Component
|| e.Component == rootComponent))
499
if (
Component
is IPersistComponentSettings persistableComponent && rootComponent is not null)
503
Debug.Assert(
Component
.Site is not null);
506
settingsKeyName = $"{rootComponent.Site!.Name}.{
Component
.Site.Name}";
510
settingsKeyName =
Component
.Site.Name;
525
if (
Component
is IPersistComponentSettings persistableComponent)
534
if (
Component
is IPersistComponentSettings)
564
ISite componentSite =
Component
.Site ?? throw new InvalidOperationException("Component should have a site");
710
if (
Component
is IPersistComponentSettings
726
=> GetService<IComponentChangeService>()?.OnComponentChanged(
Component
, member, oldValue, newValue);
734
=> GetService<IComponentChangeService>()?.OnComponentChanging(
Component
, member);
System\ComponentModel\Design\ComponentDesigner.ShadowPropertyCollection.cs (3)
39
return property.GetValue(_designer.
Component
);
62
descriptor = TypeDescriptor.GetProperties(_designer.
Component
.GetType())[propertyName];
87
return shadowedPropertyDescriptor.ShouldSerializeValue(_designer.
Component
);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
607
AddChildCompSnaplines(internalDesigner.
Component
, dragComponents, clipBounds, targetControl) &&
608
AddControlSnaplinesWhenResizing(internalDesigner, (Control)internalDesigner.
Component
, targetControl))
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (1)
96
selSvc?.SetSelectedComponents(new object[] { _designer.
Component
}, SelectionTypes.Primary);
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (5)
53
BindingNavigator navigator = (BindingNavigator)
Component
;
54
IDesignerHost? host =
Component
?.Site?.GetService<IDesignerHost>();
74
BindingNavigator navigator = (BindingNavigator)
Component
;
131
BindingNavigator navigator = (BindingNavigator)
Component
;
170
BindingNavigator navigator = (BindingNavigator)
Component
;
System\Windows\Forms\Design\BindingSourceDesigner.cs (3)
45
if (_bindingUpdatedByUser && e.Component ==
Component
&&
51
dataSourceProviderService?.NotifyDataSourceComponentAdded(
Component
);
57
if (
Component
is BindingSource bindingSource && bindingSource.DataSource == e.Component)
System\Windows\Forms\Design\ButtonBaseDesigner.cs (7)
27
PropertyDescriptor? prop = TypeDescriptor.GetProperties(
Component
)["UseVisualStyleBackColor"];
32
if (!prop.ShouldSerializeValue(
Component
))
34
prop.SetValue(
Component
, true);
51
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(
Component
);
55
Component
,
60
Component
,
75
Component
,
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (3)
25
_provider = designer.
Component
.Site;
46
ToolStrip toolStrip = _designer.
Component
as ToolStrip;
47
if (toolStrip is not null && _designer is not null && _designer.
Component
is not null && _provider is not null)
System\Windows\Forms\Design\CollectionEditVerbManager.cs (11)
34
prop = TypeDescriptor.GetDefaultProperty(designer.
Component
);
72
if (_designer.
Component
.Site is not null)
74
return _designer.
Component
.Site.Container;
89
void ITypeDescriptorContext.OnComponentChanged() => ChangeService.OnComponentChanged(_designer.
Component
, _targetProperty);
98
ChangeService.OnComponentChanging(_designer.
Component
, _targetProperty);
118
get => _designer.
Component
;
139
if (_designer.
Component
.Site is not null)
141
return _designer.
Component
.Site.GetService(serviceType);
178
return dialog.ShowDialog(_designer.
Component
as IWin32Window);
188
actionUIService?.HideUI(_designer.
Component
);
190
object propertyValue = _targetProperty.GetValue(_designer.
Component
);
System\Windows\Forms\Design\ComboBoxDesigner.cs (5)
22
public override ComboBox Control => (ComboBox)
Component
;
84
PropertyDescriptor? textProp = TypeDescriptor.GetProperties(
Component
)["Text"];
87
textProp.SetValue(
Component
, string.Empty);
110
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(
Component
);
111
if (props.TryGetPropertyDescriptorValue("DropDownStyle",
Component
, ref style))
System\Windows\Forms\Design\CommandSet.cs (1)
2017
Component? parentComp = parentCompDesigner?.
Component
as Component;
System\Windows\Forms\Design\ContextMenuStripActionList.cs (2)
15
: base(designer.
Component
)
17
_toolStripDropDown = (ToolStripDropDown)designer.
Component
;
System\Windows\Forms\Design\ControlCommandSet.cs (1)
629
dragManager = new DragAssistanceManager(des.
Component
.Site, selComps);
System\Windows\Forms\Design\ControlDesigner.ChildSubClass.cs (1)
66
if (_designer is not null && _designer.
Component
is not null)
System\Windows\Forms\Design\ControlDesigner.ChildWindowTarget.cs (1)
39
if (_designer.
Component
is null)
System\Windows\Forms\Design\ControlDesigner.cs (46)
136
public virtual Control Control => (Control)
Component
;
160
get =>
Component
.Site?.Name;
165
&&
Component
.Site is not null)
167
Component
.Site.Name = value;
178
Component
is Control c && c.Parent is not null ? c.Parent : base.ParentComponent;
202
object component =
Component
;
217
if (AutoResizeHandles &&
Component
!= _host?.RootComponent)
309
object component =
Component
;
374
Debug.Assert(
Component
is not null, "this.component needs to be set before this method is valid.");
375
return TryGetService(out IDesignerHost? host) &&
Component
== host.RootComponent;
530
if (
Component
is not Control ctl)
669
=> _moveBehavior ??= new ContainerSelectorBehavior(Control,
Component
.Site);
688
if (parent is not null && _host is not null && _host.RootComponent !=
Component
)
768
if (TypeDescriptor.GetAttributes(
Component
).Contains(DesignTimeVisibleAttribute.Yes)
771
Glyph? dapGlyph = designerActionUI.GetDesignerActionGlyph(
Component
);
826
if (TypeDescriptor.GetAttributes(
Component
).Contains(DesignTimeVisibleAttribute.Yes)
829
Glyph? dapGlyph = designerActionUI.GetDesignerActionGlyph(
Component
);
845
internal virtual Behavior.Behavior StandardBehavior => _resizeBehavior ??= new ResizeBehavior(
Component
.Site);
934
AttributeCollection attributes = TypeDescriptor.GetAttributes(
Component
);
944
designerActionService.Add(
Component
, _dockingAction);
1001
object component =
Component
;
1010
object component =
Component
;
1042
if (
Component
is Control ctl)
1138
ISite? site =
Component
.Site;
1141
PropertyDescriptor? textProp = TypeDescriptor.GetProperties(
Component
)["Text"];
1144
textProp.SetValue(
Component
, site.Name);
1159
AttributeCollection attributes = TypeDescriptor.GetAttributes(
Component
);
1177
PropertyDescriptor? dockProp = TypeDescriptor.GetProperties(
Component
)["Dock"];
1180
dockProp.SetValue(
Component
, DockStyle.Fill);
1198
ISite? site =
Component
.Site;
1201
PropertyDescriptor? textProp = TypeDescriptor.GetProperties(
Component
)["Text"];
1204
textProp.SetValue(
Component
, site.Name);
1312
selectionService.SetSelectedComponents(new object[] {
Component
}, SelectionTypes.Primary);
1335
|| (selectionService is not null && !selectionService.GetComponentSelected(
Component
))))
1337
selectionService?.SetSelectedComponents(new object[] {
Component
}, SelectionTypes.Primary);
1401
if (TryGetService(out ISelectionService? selectionService) && !
Component
.Equals(selectionService.PrimarySelection))
1403
selectionService.SetSelectedComponents(new object[] {
Component
}, SelectionTypes.Primary | SelectionTypes.Toggle);
1595
_hasLocation = TypeDescriptor.GetProperties(
Component
)["Location"] is not null;
1830
mouseHandler.OnMouseHover(
Component
);
1856
mouseHandler.OnMouseDoubleClick(
Component
);
1882
mouseHandler.OnMouseDoubleClick(
Component
);
1919
mouseHandler.OnMouseDown(
Component
, button, location.X, location.Y);
1928
new object[] {
Component
},
1968
mouseHandler.OnMouseMove(
Component
, location.X, location.Y);
1999
mouseHandler.OnMouseUp(
Component
, button);
2140
mouseHandler.OnSetCursor(
Component
);
System\Windows\Forms\Design\ControlDesigner.DockingActionList.cs (1)
16
: base(owner.
Component
)
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (10)
26
DataGridViewColumn col = (DataGridViewColumn)
Component
;
34
DataGridViewColumn? col = (DataGridViewColumn)
Component
;
83
if ((host is null || (host is not null && !host.Loading)) &&
Component
.Site is not null)
85
Component
.Site.Name = value;
125
DataGridViewColumn col = (DataGridViewColumn)
Component
;
130
DataGridViewColumn col = (DataGridViewColumn)
Component
;
214
&&
Component
.Equals(_selectionService.PrimarySelection))
244
if (
Component
.Site is null)
275
DataGridViewColumn col = (DataGridViewColumn)
Component
;
288
return _initializing ? (
Component
!= host.RootComponent) // for non root components, respect the name that the base Control serialized unless changed
System\Windows\Forms\Design\DataGridViewComboBoxColumnDesigner.cs (6)
20
DataGridViewComboBoxColumn dataGridViewComboBoxColumn = (DataGridViewComboBoxColumn)
Component
;
25
DataGridViewComboBoxColumn dataGridViewComboBoxColumn = (DataGridViewComboBoxColumn)
Component
;
42
DataGridViewComboBoxColumn dataGridViewComboBoxColumn = (DataGridViewComboBoxColumn)
Component
;
47
DataGridViewComboBoxColumn dataGridViewComboBoxColumn = (DataGridViewComboBoxColumn)
Component
;
62
DataGridViewComboBoxColumn dataGridViewComboBoxColumn = (DataGridViewComboBoxColumn)
Component
;
68
DataGridViewComboBoxColumn dataGridViewComboBoxColumn = (DataGridViewComboBoxColumn)
Component
;
System\Windows\Forms\Design\DataGridViewDesigner.cs (10)
16
public override DataGridView Control => (DataGridView)
Component
;
742
IDesignerHost? host =
Component
.Site?.GetService<IDesignerHost>();
770
IDesignerHost? host =
Component
.Site?.GetService<IDesignerHost>();
798
if (
Component
.Site.TryGetService(out IUIService? service))
813
public DataGridViewChooseDataSourceActionList(DataGridViewDesigner owner) : base(owner.
Component
)
825
RelatedComponent = _owner.
Component
848
changeService?.OnComponentChanging(_owner.
Component
, dataSourceProp);
851
changeService?.OnComponentChanged(_owner.
Component
, dataSourceProp, null, null);
866
public DataGridViewColumnEditingActionList(DataGridViewDesigner owner) : base(owner.
Component
)
897
public DataGridViewPropertiesActionList(DataGridViewDesigner owner) : base(owner.
Component
)
System\Windows\Forms\Design\DocumentDesigner.cs (17)
512
Point loc = BehaviorService.ControlToAdornerWindow((Control)
Component
);
513
Rectangle translatedBounds = new(loc, ((Control)
Component
).Size);
517
PropertyDescriptor prop = TypeDescriptor.GetProperties(
Component
)["Locked"];
520
locked = (bool)prop.GetValue(
Component
);
524
prop = TypeDescriptor.GetProperties(
Component
)["AutoSize"];
527
autoSize = (bool)prop.GetValue(
Component
);
531
prop = TypeDescriptor.GetProperties(
Component
)["AutoSizeMode"];
534
mode = (AutoSizeMode)prop.GetValue(
Component
);
676
PropertyDescriptor backProp = TypeDescriptor.GetProperties(
Component
.GetType())["BackColor"];
677
if (backProp is not null && backProp.PropertyType == typeof(Color) && !backProp.ShouldSerializeValue(
Component
))
708
_behaviorService = new BehaviorService(
Component
.Site, _frame);
903
_componentTray = new ComponentTray(this,
Component
.Site);
978
if (selSvc.SelectionCount == 1 && selSvc.GetComponentSelected(
Component
))
1032
return new ToolStripAdornerWindowService(
Component
.Site, _frame);
1115
ss.SetSelectedComponents(new object[] {
Component
}, SelectionTypes.Replace);
1116
Debug.Assert(ss.PrimarySelection ==
Component
, "Bug in selection service: form should have primary selection.");
1195
if (obj !=
Component
)
System\Windows\Forms\Design\EditorServiceContext.cs (8)
27
prop = TypeDescriptor.GetDefaultProperty(designer.
Component
);
76
IContainer? ITypeDescriptorContext.Container => _designer.
Component
.Site?.Container;
80
=> ChangeService.OnComponentChanged(_designer.
Component
, _targetProperty);
87
ChangeService.OnComponentChanging(_designer.
Component
, _targetProperty);
96
object ITypeDescriptorContext.Instance => _designer.
Component
;
107
return _designer.
Component
?.Site?.GetService(serviceType);
132
return dialog.ShowDialog(_designer.
Component
as IWin32Window);
141
object? propertyValue = _targetProperty?.GetValue(_designer.
Component
);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (3)
591
PropertyDescriptor controlsProperty = TypeDescriptor.GetProperties(
Component
)["Controls"];
629
List<IComponent> tempList = DesignerUtils.CopyDragObjects(_dragControls,
Component
.Site);
724
PropertyDescriptor controlsProperty = TypeDescriptor.GetProperties(
Component
)["Controls"];
System\Windows\Forms\Design\FormDocumentDesigner.cs (9)
35
((Form)
Component
).AcceptButton = value;
49
((Form)
Component
).CancelButton = value;
65
SizeF real = Form.GetAutoScaleSize(((Form)
Component
).Font);
89
return !_initializing && ((Form)
Component
).AutoScale && ShadowProperties.Contains(nameof(AutoScaleBaseSize));
107
if (
Component
is Form form)
131
((Form)
Component
).ClientSize = value;
236
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(
Component
);
237
changeService?.OnComponentChanging(
Component
, props["ClientSize"]);
240
changeService?.OnComponentChanged(
Component
, props["ClientSize"]);
System\Windows\Forms\Design\ImageListActionList.cs (1)
15
: base(designer.
Component
)
System\Windows\Forms\Design\ImageListDesigner.cs (1)
51
internal ImageList ImageList => (ImageList)
Component
;
System\Windows\Forms\Design\LabelDesigner.cs (7)
35
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(
Component
);
39
Component
,
48
Component
,
56
Component
,
74
int offset = (int)(info.Invoke(
Component
, parameters: null) ?? 0);
147
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(
Component
);
150
Component
,
System\Windows\Forms\Design\ListBoxDesigner.cs (10)
25
ListBox listBox = (ListBox)
Component
;
39
return ((ListBox)
Component
).Dock;
43
ListBox listBox = (ListBox)
Component
;
123
((ListBox)
Component
).FormattingEnabled = true;
128
if (TypeDescriptorHelper.TryGetPropertyValue(
Component
, nameof(ListBox.Name), out string? name)
141
if (e.Component ==
Component
&& e.NewName is not null)
153
if (e.Component ==
Component
156
&& TypeDescriptorHelper.TryGetPropertyValue(
Component
, nameof(ListBox.Name), out string? name)
170
if (TypeDescriptorHelper.TryGetPropertyValue(
Component
, nameof(ListBox.Name), out string? name)
198
if (
Component
is CheckedListBox)
System\Windows\Forms\Design\ListControlUnboundActionList.cs (1)
13
: base(designer.
Component
)
System\Windows\Forms\Design\ListViewActionList.cs (1)
15
: base(designer.
Component
)
System\Windows\Forms\Design\ListViewDesigner.cs (6)
59
return ((ListView)
Component
).View;
63
((ListView)
Component
).View = value;
75
ListView listView = (ListView)
Component
;
145
GetService<IComponentChangeService>().OnComponentChanged(
Component
);
157
ShowErrorDialog(
Component
.Site.GetService<IUIService>(), ex, (ListView)
Component
);
System\Windows\Forms\Design\MaskedTextBoxDesignerActionList.cs (2)
26
: base(designer.
Component
)
28
_maskedTextBox = (MaskedTextBox)designer.
Component
;
System\Windows\Forms\Design\NotifyIconDesigner.cs (1)
16
NotifyIcon icon = (NotifyIcon)
Component
;
System\Windows\Forms\Design\NotifyIconDesignerActionList.cs (1)
11
public NotifyIconActionList(NotifyIconDesigner designer) : base(designer.
Component
)
System\Windows\Forms\Design\PanelDesigner.cs (2)
30
Panel panel = (Panel)
Component
; // if the panel is invisible, bail now
53
Panel panel = (Panel)
Component
;
System\Windows\Forms\Design\ParentControlDesigner.cs (21)
120
_defaultUseSnapLines = DesignerUtils.UseSnapLines(
Component
.Site);
348
private IServiceProvider ServiceProvider =>
Component
is not null ?
Component
.Site : (IServiceProvider)null;
488
if (primarySelection ==
Component
|| selectedControl is null)
866
IContainer container =
Component
.Site.Container;
1001
if (parent is not null && host is not null && host.RootComponent !=
Component
)
1041
Point loc = BehaviorService.ControlToAdornerWindow((Control)
Component
);
1042
Rectangle translatedBounds = new(loc, ((Control)
Component
).Size);
1052
ContainerSelectorBehavior behavior = new((Control)
Component
,
Component
.Site, true);
1391
data.Target =
Component
;
1458
behDataObject.Target =
Component
;
1460
newTarget = !(data.Source.Equals(
Component
)); // Check if we are moving to a new target
1590
_toolboxItemSnapLineBehavior ??= new ToolboxItemSnapLineBehavior(
Component
.Site, BehaviorService, this, AllowGenericDragBox);
1634
sel?.SetSelectedComponents(new object[] {
Component
}, SelectionTypes.Replace);
1659
data.Target =
Component
;
1734
selsvc?.SetSelectedComponents(new object[] {
Component
}, SelectionTypes.Primary);
1931
_dragManager = new DragAssistanceManager(
Component
.Site);
2298
return
Component
;
2309
IContainer container = DesignerUtils.CheckForNestedContainer(
Component
.Site.Container); // ...necessary to support SplitterPanel components
2356
string error = string.Format(SR.DesignerCantParentType, component.GetType().Name,
Component
.GetType().Name);
System\Windows\Forms\Design\PictureBoxActionList.cs (2)
15
: base(designer.
Component
)
18
_pictureBox = (PictureBox)designer.
Component
;
System\Windows\Forms\Design\PictureBoxDesigner.cs (3)
67
PictureBox pictureBox = (PictureBox)
Component
;
88
PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(
Component
);
92
Component
,
System\Windows\Forms\Design\PrintDialogDesigner.cs (1)
21
if (
Component
is PrintDialog dialog)
System\Windows\Forms\Design\RadioButtonDesigner.cs (2)
21
PropertyDescriptor? prop = TypeDescriptor.GetProperties(
Component
)["TabStop"];
24
prop.SetValue(
Component
, true);
System\Windows\Forms\Design\RichTextBoxActionList.cs (1)
13
: base(designer.
Component
)
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
326
var uiService = (IUIService?)
Component
?.Site?.GetService(typeof(IUIService));
System\Windows\Forms\Design\SplitContainerDesigner.OrientationActionList.cs (2)
21
: base(owner.
Component
)
24
_ownerComponent = owner.
Component
as Component;
System\Windows\Forms\Design\SplitterDesigner.cs (1)
46
if (((Splitter)
Component
).BorderStyle == BorderStyle.None)
System\Windows\Forms\Design\StandardMenuStripVerb.cs (9)
32
_provider = designer.
Component
.Site;
43
actionUIService?.HideUI(_designer.
Component
);
49
if (_designer.
Component
is MenuStrip menuStrip)
55
CreateStandardToolStrip(_host, (ToolStrip)_designer.
Component
);
246
selSvc?.SetSelectedComponents(new object[] { _designer.
Component
});
250
actionUIService?.Refresh(_designer.
Component
);
390
selSvc?.SetSelectedComponents(new object[] { _designer.
Component
});
394
actionUIService?.Refresh(_designer.
Component
);
483
string nameOfRandomItem = ToolStripDesigner.NameFromText(null, typeof(ToolStripMenuItem), _designer.
Component
.Site);
System\Windows\Forms\Design\TabControlDesigner.cs (11)
99
MemberDescriptor member = TypeDescriptor.GetProperties(component:
Component
)["Controls"];
103
TabControl tc = (TabControl)
Component
;
240
TabControl tc = (TabControl)
Component
;
250
t = host.CreateTransaction(string.Format(SR.TabControlAddTab,
Component
.Site.Name));
323
TabControl tc = (TabControl)
Component
;
332
MemberDescriptor member = TypeDescriptor.GetProperties(
Component
)["Controls"];
345
t = host.CreateTransaction(string.Format(SR.TabControlRemoveTab, ((IComponent)tp).Site.Name,
Component
.Site.Name));
408
TabControl tabControl = (TabControl)
Component
;
440
TabControl tabControl = (TabControl)
Component
;
455
svc.SetSelectedComponents(new object[] {
Component
});
485
TabPage selectedTab = ((TabControl)
Component
).SelectedTab;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (16)
53
private TableLayoutPanelBehavior Behavior => _tlpBehavior ??= new TableLayoutPanelBehavior(Table, this,
Component
.Site);
126
_designerContextMenuStrip = new BaseContextMenuStrip(
Component
.Site);
208
internal TableLayoutPanel Table =>
Component
as TableLayoutPanel;
263
actionUIService?.Refresh(
Component
);
389
public TableLayouPanelRowColumnActionList(TableLayoutPanelDesigner owner) : base(owner.
Component
)
564
temp = DesignerUtils.CopyDragObjects(temp,
Component
.Site);
1063
PropertyDescriptor prop = TypeDescriptor.GetProperties(
Component
)["Locked"];
1064
bool locked = (prop is not null) && ((bool)prop.GetValue(
Component
));
1397
if (_extenderProperties is null &&
Component
is not null)
1401
AttributeCollection attribs = TypeDescriptor.GetAttributes(
Component
.GetType());
1433
if (changingControl is not null && changingControl.Parent ==
Component
&&
1436
PropertyDescriptor controlsProp = TypeDescriptor.GetProperties(
Component
)["Controls"];
1437
_compSvc.OnComponentChanging(
Component
, controlsProp);
1459
if (c is not null && c.Parent ==
Component
&&
1462
PropertyDescriptor controlsProp = TypeDescriptor.GetProperties(
Component
)["Controls"];
1463
_compSvc.OnComponentChanged(
Component
, controlsProp, null, null);
System\Windows\Forms\Design\TextBoxActionList.cs (2)
14
: base(designer.
Component
)
16
_textBox = (TextBox)designer.
Component
;
System\Windows\Forms\Design\TextBoxBaseDesigner.cs (6)
31
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(
Component
);
34
Component
,
77
return TypeDescriptor.GetProperties(typeof(TextBoxBase))["Text"]!.ShouldSerializeValue(
Component
);
93
PropertyDescriptor? textProp = TypeDescriptor.GetProperties(
Component
)["Text"];
96
textProp.SetValue(
Component
, string.Empty);
129
object component =
Component
;
System\Windows\Forms\Design\ToolStripActionList.cs (2)
18
: base(designer.
Component
)
20
_toolStrip = (ToolStrip)designer.
Component
;
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (4)
47
((ToolStripContainer)
Component
).TopToolStripPanelVisible = value;
61
((ToolStripContainer)
Component
).LeftToolStripPanelVisible = value;
75
((ToolStripContainer)
Component
).RightToolStripPanelVisible = value;
89
((ToolStripContainer)
Component
).BottomToolStripPanelVisible = value;
System\Windows\Forms\Design\ToolStripContentPanelDesigner.cs (2)
18
if (_contextMenu is null &&
Component
.Site is { } site)
58
ToolStripContentPanel? panel =
Component
as ToolStripContentPanel;
System\Windows\Forms\Design\ToolStripDesigner.cs (17)
411
get => (ToolStrip)
Component
;
425
_keyboardHandlingService ??= new ToolStripKeyboardHandlingService(
Component
.Site);
574
IComponent component = _host.CreateComponent(t, NameFromText(text, t,
Component
.Site));
728
_tn = new ToolStripTemplateNode(
Component
, SR.ToolStripDesignerTemplateNodeEnterText);
908
RaiseComponentChanging(TypeDescriptor.GetProperties(
Component
)["Items"]);
930
RaiseComponentChanged(TypeDescriptor.GetProperties(
Component
)["Items"], null, null);
1033
if (e.Component is ToolStripItem item && item.Owner ==
Component
)
1042
RaiseComponentChanged(TypeDescriptor.GetProperties(
Component
)["Items"], null, null);
1110
if (e.Component is ToolStripItem item && item.Owner ==
Component
)
1117
RaiseComponentChanging(TypeDescriptor.GetProperties(
Component
)["Items"]);
1368
Point loc = BehaviorService.ControlToAdornerWindow((Control)
Component
);
1369
Rectangle translatedBounds = new(loc, ((Control)
Component
).Size);
1377
ContainerSelectorBehavior behavior = new(ToolStrip,
Component
.Site, true);
1440
new EditorServiceContext(this, TypeDescriptor.GetProperties(
Component
)["Items"], SR.ToolStripItemCollectionEditorVerb);
1445
new ToolStripKeyboardHandlingService(
Component
.Site);
1451
new ToolStripInSituService(
Component
.Site);
1877
components = DesignerUtils.CopyDragObjects(dragComponents,
Component
.Site);
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (17)
80
get => ((ToolStrip)
Component
).Items;
164
if (
Component
is IPersistComponentSettings persistableComponent && _host is not null)
171
ShadowProperties[SettingsKeyName] = $"{rootComponent.Site.Name}.{
Component
.Site.Name}";
175
ShadowProperties[SettingsKeyName] =
Component
.Site.Name;
189
if (
Component
is IPersistComponentSettings persistableComponent)
358
inSituService ??= new ToolStripInSituService(
Component
.Site);
360
_dropDown = (ToolStripDropDown)
Component
;
394
Name =
Component
.Site.Name
408
new EditorServiceContext(this, TypeDescriptor.GetProperties(
Component
)["Items"], SR.ToolStripItemCollectionEditorVerb);
497
bool showDesignMenu = IsContextMenuStripItemSelected(selectionService) ||
Component
.Equals(selectionService.PrimarySelection);
509
if (
Component
is null || _menuItem is null)
518
selectionService.SetSelectedComponents(new IComponent[] {
Component
}, SelectionTypes.Replace);
522
if (
Component
.Equals(selectionService.PrimarySelection) && _selected)
527
bool showDesignMenu = IsContextMenuStripItemSelected(selectionService) ||
Component
.Equals(selectionService.PrimarySelection);
574
if (
Component
is IPersistComponentSettings)
711
private bool ShouldSerializeSettingsKey() =>
Component
is IPersistComponentSettings persistableComponent
735
if (_selectionService is not null &&
Component
.Equals(_selectionService.PrimarySelection))
System\Windows\Forms\Design\ToolStripDropDownItemDesigner.cs (1)
28
if (
Component
is ToolStripDropDownItem item && item.DropDown.IsAutoGenerated)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (11)
81
BaseContextMenuStrip toolStripContextMenu = new(
Component
.Site);
93
_toolStripItemCustomMenuItemCollection ??= new ToolStripItemCustomMenuItemCollection(
Component
.Site, ToolStripItem);
226
get => (ToolStripItem)
Component
;
677
ISite site =
Component
.Site;
678
if (site is not null &&
Component
is ToolStripDropDownItem)
683
IComponent component =
Component
;
700
if (
Component
is ToolStripTextBox or ToolStripComboBox)
702
PropertyDescriptor textProp = TypeDescriptor.GetProperties(
Component
)["Text"];
705
textProp.SetValue(
Component
, string.Empty);
762
serializationService.Serialize(serializedData,
Component
); // notice the use of component... since we want to preserve the type.
1216
IDesignerHost designerHost = (IDesignerHost)
Component
.Site.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (1)
534
SelectionService.SetSelectedComponents(new object[] { dropDownDesigner.
Component
}, SelectionTypes.Replace);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (3)
304
&& menuStrip.OwnerItem ==
Component
375
_typeHereTemplateNode = new ToolStripTemplateNode(
Component
, SR.ToolStripDesignerTemplateNodeEnterText);
750
_commitedTemplateNode = new ToolStripTemplateNode(
Component
, text)
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (8)
66
ISite? site =
Component
.Site;
88
public override ToolStripPanel Control => (ToolStripPanel)
Component
;
255
if (_containerSelectorGlyph is null &&
Component
.Site is not null)
258
_behavior = new ToolStripPanelSelectionBehavior(Control,
Component
.Site);
259
_containerSelectorGlyph = new ToolStripPanelSelectionGlyph(Rectangle.Empty, Cursors.Default, Control,
Component
.Site, _behavior);
286
if (_containerSelectorGlyph is null &&
Component
.Site is not null)
289
_behavior = new ToolStripPanelSelectionBehavior(Control,
Component
.Site);
290
_containerSelectorGlyph = new ToolStripPanelSelectionGlyph(Rectangle.Empty, Cursors.Default, Control,
Component
.Site, _behavior);
System\Windows\Forms\Design\TrackBarDesigner.cs (2)
22
if (GetPropertyValue<bool>(
Component
, nameof(TrackBar.AutoSize)))
24
var orientation = GetPropertyValue<Orientation?>(
Component
, nameof(TrackBar.Orientation)) ?? Orientation.Horizontal;
System\Windows\Forms\Design\TreeViewActionList.cs (2)
15
: base(designer.
Component
)
18
_treeView = (TreeView)designer.
Component
;
System\Windows\Forms\Design\UpDownBaseDesigner.cs (2)
47
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(
Component
);
50
Component
,
System.Windows.Forms.Design.Tests (27)
ControlDesignerTests.cs (2)
40
IComponent component = controlDesigner.
Component
;
360
{ nameof(mockParentDesigner.Object.
Component
), new Control() }
System\ComponentModel\Design\ComponentDesignerTests.cs (24)
22
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
549
Assert.Same(mockComponent.Object, designer.
Component
);
552
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
557
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
606
Assert.Same(component, designer.
Component
);
609
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
613
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
621
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
625
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
641
Assert.Same(mockComponent.Object, designer.
Component
);
646
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
650
Assert.Same(mockComponent.Object, designer.
Component
);
659
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
663
Assert.Same(mockComponent.Object, designer.
Component
);
689
Assert.Same(component, designer.
Component
);
694
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
698
Assert.Same(component, designer.
Component
);
705
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
709
Assert.Same(component, designer.
Component
);
719
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
723
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
2006
Assert.Same(component, designer.
Component
);
2014
Assert.Throws<InvalidOperationException>(() => designer.
Component
);
2131
Assert.Same(component, designer.
Component
);
System\Windows\Forms\Design\ImageListActionListTests.cs (1)
35
_actionList.Component.Should().Be(_imageListDesigner.
Component
);