99 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)
235if (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)
1001if (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)
161|| 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)
181return inheritanceAttribute is null || inheritanceAttribute.InheritanceLevel == InheritanceLevel.NotInherited;
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (4)
1092if (ia is not null && (ia.InheritanceLevel == InheritanceLevel.Inherited || ia.InheritanceLevel == InheritanceLevel.InheritedReadOnly)) 1120if (ia is not null && (ia.InheritanceLevel == InheritanceLevel.Inherited || ia.InheritanceLevel == InheritanceLevel.InheritedReadOnly))
System.Windows.Forms.Design.Tests (51)
System\ComponentModel\Design\ArrayEditorTests.cs (5)
71yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 72yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 73yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 74yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 75yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\CollectionEditorTests.cs (5)
73yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 74yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 75yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 76yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 77yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\CollectionFormTests.cs (5)
467yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited - 1), false }; 468yield return new object[] { new InheritanceAttribute(InheritanceLevel.Inherited), false }; 469yield return new object[] { new InheritanceAttribute(InheritanceLevel.InheritedReadOnly), false }; 470yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited), true }; 471yield return new object[] { new InheritanceAttribute(InheritanceLevel.NotInherited + 1), false };
System\ComponentModel\Design\DesignerHostTests.cs (12)
386TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 390TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 394TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 457TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 461TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 465TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 2577TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 2581TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 2585TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 2647TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 2651TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 2655TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited));
System\ComponentModel\Design\SiteNestedContainerTests.cs (12)
290TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 294TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 298TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 366TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 370TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 374TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 713TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 717TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 721TypeDescriptor.AddAttributes(notInheritedComponent, new InheritanceAttribute(InheritanceLevel.NotInherited)); 778TypeDescriptor.AddAttributes(readOnlyComponent, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly)); 782TypeDescriptor.AddAttributes(inheritedComponent, new InheritanceAttribute(InheritanceLevel.Inherited)); 786TypeDescriptor.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); 102[InlineData(InheritanceLevel.Inherited, "Inherited control")] 103[InlineData(InheritanceLevel.InheritedReadOnly, "Inherited control (Private)")] 104public void AddInheritedControl_ShouldSetToolTipText_And_InitializeToolTip(InheritanceLevel inheritanceLevel, string expectedText) 118_inheritanceUI.AddInheritedControl(_control, InheritanceLevel.Inherited); 150_inheritanceUI.AddInheritedControl(_control, InheritanceLevel.Inherited);
System\Windows\Forms\Design\ToolStripActionListTests.cs (1)
119TypeDescriptor.AddAttributes(_toolStrip, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly));
System\Windows\Forms\Design\ToolStripContainerActionListTests.cs (1)
77TypeDescriptor.AddAttributes(inheritedControl, new InheritanceAttribute(InheritanceLevel.InheritedReadOnly));