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