3 instantiations of InheritanceAttribute
System.ComponentModel.TypeConverter (3)
System\ComponentModel\InheritanceAttribute.cs (3)
21
public static readonly InheritanceAttribute Inherited = new
InheritanceAttribute
(InheritanceLevel.Inherited);
30
public static readonly InheritanceAttribute InheritedReadOnly = new
InheritanceAttribute
(InheritanceLevel.InheritedReadOnly);
38
public static readonly InheritanceAttribute NotInherited = new
InheritanceAttribute
(InheritanceLevel.NotInherited);
180 references to InheritanceAttribute
netstandard (1)
netstandard.cs (1)
339
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.
InheritanceAttribute
))]
System (1)
src\runtime\src\libraries\shims\System\ref\System.cs (1)
325
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.
InheritanceAttribute
))]
System.ComponentModel.TypeConverter (11)
System\ComponentModel\Container.cs (3)
234
InheritanceAttribute
inheritanceAttribute = (
InheritanceAttribute
)TypeDescriptor.GetAttributes(s.Component)[typeof(
InheritanceAttribute
)]!;
System\ComponentModel\Design\IInheritanceService.cs (2)
19
/// value <see cref='System.ComponentModel.
InheritanceAttribute
.NotInherited'/>.
22
InheritanceAttribute
GetInheritanceAttribute(IComponent component);
System\ComponentModel\InheritanceAttribute.cs (6)
21
public static readonly
InheritanceAttribute
Inherited = new InheritanceAttribute(InheritanceLevel.Inherited);
30
public static readonly
InheritanceAttribute
InheritedReadOnly = new InheritanceAttribute(InheritanceLevel.InheritedReadOnly);
38
public static readonly
InheritanceAttribute
NotInherited = new InheritanceAttribute(InheritanceLevel.NotInherited);
46
public static readonly
InheritanceAttribute
Default = NotInherited;
87
if (!(value is
InheritanceAttribute
))
92
InheritanceLevel valueLevel = ((
InheritanceAttribute
)value).InheritanceLevel;
System.Windows.Forms (6)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
362
forceReadOnly |= TypeDescriptor.GetAttributes(value).Contains(
InheritanceAttribute
.InheritedReadOnly);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.cs (1)
45
|| TypeDescriptor.GetAttributes(target).Contains(
InheritanceAttribute
.InheritedReadOnly))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
128
|| TypeDescriptor.GetAttributes(Target).Contains(
InheritanceAttribute
.InheritedReadOnly))
System\Windows\Forms\DataBinding\Binding.cs (3)
495
InheritanceAttribute
? attr = (
InheritanceAttribute
?)TypeDescriptor.GetAttributes(BindableComponent)[typeof(
InheritanceAttribute
)];
System.Windows.Forms.Design (161)
System\ComponentModel\Design\CollectionEditor.cs (2)
61
if (TypeDescriptorHelper.TryGetAttribute(component, out
InheritanceAttribute
? attribute)
319
&& inheritanceService.GetInheritanceAttribute(component).Equals(
InheritanceAttribute
.InheritedReadOnly))
System\ComponentModel\Design\ComponentDesigner.cs (19)
15
private
InheritanceAttribute
? _inheritanceAttribute;
63
InheritanceAttribute
? inheritanceAttribute = InheritanceAttribute;
64
return inheritanceAttribute is not null && !inheritanceAttribute.Equals(
InheritanceAttribute
.NotInherited);
90
protected virtual
InheritanceAttribute
? InheritanceAttribute
103
_inheritanceAttribute =
InheritanceAttribute
.Default;
395
InheritanceAttribute
? inheritanceAttribute = InheritanceAttribute;
396
if (isRoot || inheritanceAttribute is null || !inheritanceAttribute.Equals(
InheritanceAttribute
.NotInherited))
405
InheritanceAttribute
? inheritanceAttribute = InheritanceAttribute;
406
bool readOnlyInherit = inheritanceAttribute is not null && inheritanceAttribute.Equals(
InheritanceAttribute
.InheritedReadOnly);
446
protected
InheritanceAttribute
? InvokeGetInheritanceAttribute(ComponentDesigner? toInvoke)
603
if (attributes.Contains(typeof(
InheritanceAttribute
)))
605
_inheritanceAttribute = attributes[typeof(
InheritanceAttribute
)] as
InheritanceAttribute
;
609
InheritanceAttribute
? inheritanceAttribute = InheritanceAttribute;
610
if (inheritanceAttribute is not null && !inheritanceAttribute.Equals(
InheritanceAttribute
.NotInherited))
612
attributes[typeof(
InheritanceAttribute
)] = InheritanceAttribute;
627
InheritanceAttribute
? inheritanceAttribute = InheritanceAttribute;
628
if (inheritanceAttribute is null || !inheritanceAttribute.Equals(
InheritanceAttribute
.InheritedReadOnly))
656
bool readOnlyInherit =
InheritanceAttribute
.InheritedReadOnly.Equals(InheritanceAttribute);
System\ComponentModel\Design\DesignerActionUI.cs (4)
171
InheritanceAttribute
? attribute = (
InheritanceAttribute
?)TypeDescriptor.GetAttributes(comp)[typeof(
InheritanceAttribute
)];
172
if (attribute ==
InheritanceAttribute
.InheritedReadOnly)
System\ComponentModel\Design\DesignerHost.cs (2)
234
&& !TypeDescriptor.GetAttributes(extenderComponent).Contains(
InheritanceAttribute
.InheritedReadOnly)
994
if (TypeDescriptorHelper.TryGetAttribute(component, out
InheritanceAttribute
? ia) && ia.InheritanceLevel != InheritanceLevel.NotInherited)
System\ComponentModel\Design\InheritanceService.cs (9)
16
private Dictionary<IComponent,
InheritanceAttribute
> _inheritedComponents;
23
private
InheritanceAttribute
? _addingAttribute;
148
InheritanceAttribute
attr;
174
attr =
InheritanceAttribute
.InheritedReadOnly;
178
attr =
InheritanceAttribute
.Inherited;
249
public
InheritanceAttribute
GetInheritanceAttribute(IComponent component)
250
=> _inheritedComponents.TryGetValue(component, out
InheritanceAttribute
? attr)
252
:
InheritanceAttribute
.Default;
258
_inheritedComponents[ce.Component!] =
InheritanceAttribute
.InheritedReadOnly;
System\ComponentModel\Design\MenuCommandService.cs (1)
197
!TypeDescriptor.GetAttributes(selectedComponent).Contains(
InheritanceAttribute
.InheritedReadOnly))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersExtenderProvider.cs (2)
41
if (!TypeDescriptor.GetAttributes(o)[typeof(
InheritanceAttribute
)]!.Equals(
InheritanceAttribute
.NotInherited))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (2)
43
if (!attributes[typeof(
InheritanceAttribute
)]!.Equals(
InheritanceAttribute
.NotInherited))
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (4)
2142
InheritanceAttribute
? inheritance = (
InheritanceAttribute
?)GetAttributesHelper(manager, value)[typeof(
InheritanceAttribute
)];
2144
inheritance ??=
InheritanceAttribute
.NotInherited;
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (3)
411
if (o is IComponent && TypeDescriptor.GetAttributes(o).Contains(
InheritanceAttribute
.InheritedReadOnly))
491
if (TypeDescriptorHelper.TryGetAttribute(o, out
InheritanceAttribute
? ia))
573
if (TypeDescriptorHelper.TryGetAttribute(o, out
InheritanceAttribute
? ia))
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (1)
120
if (TypeDescriptorHelper.TryGetAttribute(value, out
InheritanceAttribute
? inheritanceAttribute))
System\ComponentModel\Design\Serialization\ResourcePropertyMemberCodeDomSerializer.cs (2)
106
if (!manager.TryGetContext(out
InheritanceAttribute
? inheritance) && !TypeDescriptorHelper.TryGetAttribute(value, out inheritance))
108
inheritance =
InheritanceAttribute
.NotInherited;
System\ComponentModel\Design\ToolStripContainerActionList.cs (2)
160
if (TypeDescriptor.GetAttributes(control)?[typeof(
InheritanceAttribute
)] is not
InheritanceAttribute
inheritanceAttribute
System\Windows\Forms\Design\CommandSet.cs (5)
2922
if (!Equals(TypeDescriptor.GetAttributes(obj)[typeof(
InheritanceAttribute
)],
InheritanceAttribute
.NotInherited))
3080
InheritanceAttribute
? attr = (
InheritanceAttribute
?)TypeDescriptor.GetAttributes(primarySelection)[typeof(
InheritanceAttribute
)];
System\Windows\Forms\Design\ComponentTray.cs (7)
724
InheritanceAttribute
attr = trayctl.InheritanceAttribute;
1495
InheritanceAttribute
attr = c.InheritanceAttribute;
1887
private readonly
InheritanceAttribute
_inheritanceAttribute;
1931
_inheritanceAttribute = (
InheritanceAttribute
)TypeDescriptor.GetAttributes(component)[typeof(
InheritanceAttribute
)];
1948
public
InheritanceAttribute
InheritanceAttribute
2302
if (!
InheritanceAttribute
.NotInherited.Equals(_inheritanceAttribute))
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (7)
101
if (TypeDescriptorHelper.TryGetAttribute(control, out
InheritanceAttribute
? inheritanceAttribute)
132
if (TypeDescriptorHelper.TryGetAttribute(control, out
InheritanceAttribute
? inheritanceAttribute)
163
if (TypeDescriptorHelper.TryGetAttribute(value, out
InheritanceAttribute
? inheritanceAttribute))
243
if (TypeDescriptor.GetAttributes(component).Contains(
InheritanceAttribute
.InheritedReadOnly))
428
InheritanceAttribute
inheritanceAttribute = (
InheritanceAttribute
)TypeDescriptor.GetAttributes(child)[typeof(
InheritanceAttribute
)]!;
System\Windows\Forms\Design\ControlCommandSet.cs (2)
1314
!TypeDescriptor.GetAttributes(obj)[typeof(
InheritanceAttribute
)].Equals(
InheritanceAttribute
.InheritedReadOnly))
System\Windows\Forms\Design\ControlDesigner.cs (3)
367
protected override
InheritanceAttribute
? InheritanceAttribute
368
=> IsRootDesigner ?
InheritanceAttribute
.Inherited : base.InheritanceAttribute;
760
if (Locked || (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly))
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (1)
74
TypeDescriptor.GetAttributes(_realCollection[i]).Contains(
InheritanceAttribute
.NotInherited))
System\Windows\Forms\Design\DataGridViewDesigner.cs (4)
150
protected override
InheritanceAttribute
? InheritanceAttribute
154
if ((base.InheritanceAttribute ==
InheritanceAttribute
.Inherited)
155
|| (base.InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly))
157
return
InheritanceAttribute
.InheritedReadOnly;
System\Windows\Forms\Design\DesignerExtenders.NameExtenderProvider.cs (2)
59
if (!TypeDescriptor.GetAttributes(o)[typeof(
InheritanceAttribute
)]?.Equals(
InheritanceAttribute
.NotInherited) ?? false)
System\Windows\Forms\Design\DesignerExtenders.NameInheritedExtenderProvider.cs (2)
39
if (!TypeDescriptor.GetAttributes(o)[typeof(
InheritanceAttribute
)]?.Equals(
InheritanceAttribute
.NotInherited) ?? false)
System\Windows\Forms\Design\DocumentDesigner.cs (1)
1342
if (!InvokeGetInheritanceAttribute(designer).Equals(
InheritanceAttribute
.InheritedReadOnly))
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (5)
80
TypeDescriptor.AddAttributes(child,
InheritanceAttribute
.InheritedReadOnly);
358
protected override
InheritanceAttribute
InheritanceAttribute
362
if ((base.InheritanceAttribute ==
InheritanceAttribute
.Inherited)
363
|| (base.InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly))
365
return
InheritanceAttribute
.InheritedReadOnly;
System\Windows\Forms\Design\OleDragDropHandler.cs (5)
476
InheritanceAttribute
attr = (
InheritanceAttribute
)TypeDescriptor.GetAttributes(components[i])[typeof(
InheritanceAttribute
)]!;
478
if (!attr.Equals(
InheritanceAttribute
.NotInherited) && !attr.Equals(
InheritanceAttribute
.InheritedReadOnly))
System\Windows\Forms\Design\ParentControlDesigner.cs (15)
1038
InheritanceAttribute !=
InheritanceAttribute
.InheritedReadOnly && selectionType != GlyphSelectionType.NotSelected)
1525
InheritanceAttribute
attr = (
InheritanceAttribute
)TypeDescriptor.GetAttributes(comp)[typeof(
InheritanceAttribute
)];
1526
if (attr is not null && !attr.Equals(
InheritanceAttribute
.NotInherited) && !attr.Equals(
InheritanceAttribute
.InheritedReadOnly))
1555
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly && draggedControl.Parent != Control)
1626
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
1713
if (!InheritanceAttribute.Equals(
InheritanceAttribute
.InheritedReadOnly))
2065
if (_toolboxService is null || !_toolboxService.SetCursor() || InheritanceAttribute.Equals(
InheritanceAttribute
.InheritedReadOnly))
2151
InheritanceAttribute
inheritanceAttribute = (
InheritanceAttribute
)TypeDescriptor.GetAttributes(control)[typeof(
InheritanceAttribute
)];
2152
if (inheritanceAttribute is not null && inheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
2457
return (!InheritanceAttribute.Equals(
InheritanceAttribute
.InheritedReadOnly));
System\Windows\Forms\Design\SplitContainerDesigner.cs (3)
189
protected override bool GetHitTest(Point point) => !(InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly) && _splitContainerSelected;
304
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly || _splitterDistanceException)
347
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
System\Windows\Forms\Design\SplitterPanelDesigner.cs (7)
29
protected override
InheritanceAttribute
? InheritanceAttribute => _splitterPanel is not null && _splitterPanel.Parent is not null
30
? (
InheritanceAttribute
?)TypeDescriptor.GetAttributes(_splitterPanel.Parent)[typeof(
InheritanceAttribute
)]
52
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
63
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
74
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
84
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (2)
34
isTargetInherited = TypeDescriptorHelper.TryGetAttribute(comp, out
InheritanceAttribute
? ia) && ia.InheritanceLevel == InheritanceLevel.Inherited;
43
if (TypeDescriptorHelper.TryGetAttribute(o, out
InheritanceAttribute
? ia))
System\Windows\Forms\Design\TableLayoutPanelCodeDomSerializer.cs (1)
46
if (!TypeDescriptorHelper.TryGetAttribute(panel, out
InheritanceAttribute
? ia) || ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (9)
1065
if (selectionType != GlyphSelectionType.NotSelected && !locked && InheritanceAttribute !=
InheritanceAttribute
.InheritedReadOnly)
1173
if (InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
1177
TypeDescriptor.AddAttributes(Control.Controls[i],
InheritanceAttribute
.InheritedReadOnly);
1182
protected override
InheritanceAttribute
InheritanceAttribute =>
1183
(base.InheritanceAttribute ==
InheritanceAttribute
.Inherited)
1184
|| (base.InheritanceAttribute ==
InheritanceAttribute
.InheritedReadOnly)
1185
?
InheritanceAttribute
.InheritedReadOnly
1576
bool enabled = (selCount == 1) && (InheritanceAttribute !=
InheritanceAttribute
.InheritedReadOnly);
2197
TypeDescriptor.GetAttributes(_realCollection[i]).Contains(
InheritanceAttribute
.NotInherited))
System\Windows\Forms\Design\ToolStripActionList.cs (2)
37
if (!TypeDescriptorHelper.TryGetAttribute(_toolStrip, out
InheritanceAttribute
? ia) || ia.InheritanceLevel == InheritanceLevel.NotInherited)
48
!TypeDescriptorHelper.TryGetAttribute(_toolStrip, out
InheritanceAttribute
? ia)
System\Windows\Forms\Design\ToolStripCodeDomSerializer.cs (1)
28
if (TypeDescriptorHelper.TryGetAttribute(item, out
InheritanceAttribute
? ia) && ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\ToolStripDesigner.cs (9)
179
InheritanceAttribute
inheritanceAttribute =
180
(
InheritanceAttribute
)TypeDescriptor.GetAttributes(ToolStrip)[typeof(
InheritanceAttribute
)];
310
protected override
InheritanceAttribute
InheritanceAttribute
314
return base.InheritanceAttribute ==
InheritanceAttribute
.Inherited
315
?
InheritanceAttribute
.InheritedReadOnly
1210
if (InheritanceAttribute !=
InheritanceAttribute
.InheritedReadOnly)
1348
if ((SelectionRules & SelectionRules.Moveable) != 0 && InheritanceAttribute !=
InheritanceAttribute
.InheritedReadOnly && (selType != GlyphSelectionType.NotSelected))
2129
|| InheritanceAttribute.Equals(
InheritanceAttribute
.InheritedReadOnly))
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (3)
110
protected override
InheritanceAttribute
InheritanceAttribute
114
if ((base.InheritanceAttribute ==
InheritanceAttribute
.Inherited))
116
return
InheritanceAttribute
.InheritedReadOnly;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (3)
119
protected override
InheritanceAttribute
InheritanceAttribute
123
if ((base.InheritanceAttribute ==
InheritanceAttribute
.Inherited))
125
return
InheritanceAttribute
.InheritedReadOnly;
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (6)
1088
InheritanceAttribute
ia = (
InheritanceAttribute
)TypeDescriptor.GetAttributes(tool)[typeof(
InheritanceAttribute
)];
1116
InheritanceAttribute
ia = (
InheritanceAttribute
)TypeDescriptor.GetAttributes(tool)[typeof(
InheritanceAttribute
)];
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (3)
91
protected override
InheritanceAttribute
? InheritanceAttribute
93
get => Control.Parent is ToolStripContainer && (base.InheritanceAttribute ==
InheritanceAttribute
.Inherited)
94
?
InheritanceAttribute
.InheritedReadOnly