97 references to InheritanceLevel
netstandard (1)
netstandard.cs (1)
340[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InheritanceLevel))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
326[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InheritanceLevel))]
System.ComponentModel.TypeConverter (8)
System\ComponentModel\Container.cs (1)
233if (inheritanceAttribute.InheritanceLevel != InheritanceLevel.InheritedReadOnly)
System\ComponentModel\InheritanceAttribute.cs (7)
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); 62public InheritanceAttribute(InheritanceLevel inheritanceLevel) 73public InheritanceLevel InheritanceLevel { get; } 92InheritanceLevel valueLevel = ((InheritanceAttribute)value).InheritanceLevel; 109public override string ToString() => TypeDescriptor.GetConverterTrimUnsafe(typeof(InheritanceLevel)).ConvertToString(InheritanceLevel)!;
System.Windows.Forms (1)
System\Windows\Forms\DataBinding\Binding.cs (1)
496if (attr is not null && attr.InheritanceLevel != InheritanceLevel.NotInherited)
System.Windows.Forms.Design (37)
System\ComponentModel\Design\CollectionEditor.cs (1)
62&& attribute.InheritanceLevel != InheritanceLevel.NotInherited)
System\ComponentModel\Design\ComponentDesigner.cs (1)
69=> InheritanceAttribute!.InheritanceLevel == InheritanceLevel.InheritedReadOnly;
System\ComponentModel\Design\DesignerHost.cs (1)
1004if (TypeDescriptorHelper.TryGetAttribute(component, out InheritanceAttribute? ia) && ia.InheritanceLevel != InheritanceLevel.NotInherited)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (2)
493genCode = ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly; 575genCode = ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly;
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (6)
118InheritanceLevel inheritanceLevel = InheritanceLevel.NotInherited; 127if (inheritanceLevel != InheritanceLevel.InheritedReadOnly) 175if (inheritanceLevel == InheritanceLevel.NotInherited) 215if (inheritanceLevel == InheritanceLevel.NotInherited) 239if (inheritanceLevel == InheritanceLevel.NotInherited)
System\ComponentModel\Design\Serialization\ResourcePropertyMemberCodeDomSerializer.cs (1)
115if (inheritance.InheritanceLevel != InheritanceLevel.InheritedReadOnly)
System\ComponentModel\Design\ToolStripContainerActionList.cs (1)
164|| inheritanceAttribute.InheritanceLevel == InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\CommandSet.cs (1)
3087if (attr.InheritanceLevel == InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\ComponentTray.cs (2)
731if (attr.InheritanceLevel != InheritanceLevel.NotInherited) 1511if (attr.InheritanceLevel != InheritanceLevel.NotInherited && _inheritanceUI is not null)
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (6)
102&& inheritanceAttribute.InheritanceLevel != InheritanceLevel.NotInherited) 133&& inheritanceAttribute.InheritanceLevel != InheritanceLevel.InheritedReadOnly) 161InheritanceLevel inheritanceLevel = InheritanceLevel.NotInherited; 168if (inheritanceLevel != InheritanceLevel.InheritedReadOnly) 430if (inheritanceAttribute.InheritanceLevel == InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\InheritanceUI.cs (3)
47public void AddInheritedControl(Control c, InheritanceLevel level) 54Debug.Assert(level != InheritanceLevel.NotInherited, "This should only be called for inherited components."); 56if (level == InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (3)
34isTargetInherited = TypeDescriptorHelper.TryGetAttribute(comp, out InheritanceAttribute? ia) && ia.InheritanceLevel == InheritanceLevel.Inherited; 45if (ia.InheritanceLevel == InheritanceLevel.InheritedReadOnly) 47else if (ia.InheritanceLevel == InheritanceLevel.Inherited && isTargetInherited)
System\Windows\Forms\Design\TableLayoutPanelCodeDomSerializer.cs (1)
46if (!TypeDescriptorHelper.TryGetAttribute(panel, out InheritanceAttribute? ia) || ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\ToolStripActionList.cs (2)
37if (!TypeDescriptorHelper.TryGetAttribute(_toolStrip, out InheritanceAttribute? ia) || ia.InheritanceLevel == InheritanceLevel.NotInherited) 49|| ia.InheritanceLevel == InheritanceLevel.InheritedReadOnly;
System\Windows\Forms\Design\ToolStripCodeDomSerializer.cs (1)
28if (TypeDescriptorHelper.TryGetAttribute(item, out InheritanceAttribute? ia) && ia.InheritanceLevel != InheritanceLevel.InheritedReadOnly)
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
179if (ia is null || ia.InheritanceLevel == InheritanceLevel.NotInherited)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (4)
1101if (ia is not null && (ia.InheritanceLevel == InheritanceLevel.Inherited || ia.InheritanceLevel == InheritanceLevel.InheritedReadOnly)) 1129if (ia is not null && (ia.InheritanceLevel == InheritanceLevel.Inherited || ia.InheritanceLevel == InheritanceLevel.InheritedReadOnly))
System.Windows.Forms.Design.Tests (49)
System\ComponentModel\Design\ArrayEditorTests.cs (5)
67yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 68yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 69yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 70yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 71yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\CollectionEditorTests.cs (5)
77yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 78yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 79yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 80yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 81yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\CollectionFormTests.cs (5)
465yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 466yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 467yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 468yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 469yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\DesignerHostTests.cs (12)
384TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 388TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 392TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 455TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 459TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 463TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 2575TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 2579TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 2583TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 2645TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 2649TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 2653TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited));
System\ComponentModel\Design\SiteNestedContainerTests.cs (12)
288TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 292TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 296TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 364TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 368TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 372TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 711TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 715TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 719TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 776TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 780TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 784TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited));
System\Windows\Forms\Design\InheritanceUITests.cs (10)
40[InlineData(InheritanceLevel.Inherited, "Inherited control")] 41[InlineData(InheritanceLevel.InheritedReadOnly, "Inherited control (Private)")] 42[InlineData(InheritanceLevel.NotInherited, "Inherited control")] 43public void AddInheritedControl_ShouldSetToolTipText(InheritanceLevel inheritanceLevel, string expectedText) 80_inheritanceUI.AddInheritedControl(trayControl, InheritanceLevel.Inherited); 104[InlineData(InheritanceLevel.Inherited, "Inherited control")] 105[InlineData(InheritanceLevel.InheritedReadOnly, "Inherited control (Private)")] 106public void AddInheritedControl_ShouldSetToolTipText_And_InitializeToolTip(InheritanceLevel inheritanceLevel, string expectedText) 120_inheritanceUI.AddInheritedControl(_control, InheritanceLevel.Inherited); 152_inheritanceUI.AddInheritedControl(_control, InheritanceLevel.Inherited);