27 instantiations of ReadOnlyAttribute
PresentationFramework (12)
System\Windows\Controls\ContentControl.cs (1)
321[Browsable(false), ReadOnly(true)]
System\Windows\Controls\Primitives\ButtonBase.cs (1)
240[Browsable(false), Category("Appearance"), ReadOnly(true)]
System\Windows\Controls\TreeView.cs (2)
66[Bindable(true), Category("Appearance"), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] 95[Bindable(true), Category("Appearance"), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
System\Windows\Controls\TreeViewItem.cs (1)
188[Browsable(false), Category("Appearance"), ReadOnly(true)]
System\Windows\Data\CollectionViewSource.cs (7)
76[ReadOnly(true)] 261[ReadOnly(true)] 329[ReadOnly(true)] 384[ReadOnly(true)] 452[ReadOnly(true)] 505[ReadOnly(true)] 573[ReadOnly(true)]
System.ComponentModel.Primitives (2)
System\ComponentModel\ReadOnlyAttribute.cs (2)
20public static readonly ReadOnlyAttribute Yes = new ReadOnlyAttribute(true); 26public static readonly ReadOnlyAttribute No = new ReadOnlyAttribute(false);
System.Data.Common (6)
System\Data\ForeignKeyConstraint.cs (4)
118[ReadOnly(true)] 131[ReadOnly(true)] 874[ReadOnly(true)] 922[ReadOnly(true)]
System\Data\UniqueConstraint.cs (2)
343[ReadOnly(true)] 428[ReadOnly(true)]
System.Diagnostics.EventLog (3)
artifacts\obj\System.Diagnostics.EventLog\Debug\net10.0\System.Diagnostics.EventLog.notsupported.cs (3)
38[System.ComponentModel.ReadOnlyAttribute(true)] 44[System.ComponentModel.ReadOnlyAttribute(true)] 55[System.ComponentModel.ReadOnlyAttribute(true)]
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DesignerExtenders.NameInheritedExtenderProvider.cs (1)
47[ReadOnly(true)]
System.Windows.Forms.Tests (3)
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (3)
1430[ReadOnly(true)] 1444[ReadOnly(true)] 1448[ReadOnly(true)]
56 references to ReadOnlyAttribute
netstandard (1)
netstandard.cs (1)
399[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.ReadOnlyAttribute))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
385[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.ReadOnlyAttribute))]
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\MetadataPropertyDescriptorWrapper.cs (1)
18if (attribute is ReadOnlyAttribute readOnlyAttribute)
System.ComponentModel.Primitives (7)
System\ComponentModel\ReadOnlyAttribute.cs (7)
20public static readonly ReadOnlyAttribute Yes = new ReadOnlyAttribute(true); 26public static readonly ReadOnlyAttribute No = new ReadOnlyAttribute(false); 29/// Specifies the default value for the <see cref='System.ComponentModel.ReadOnlyAttribute'/>, 30/// which is <see cref='System.ComponentModel.ReadOnlyAttribute.No'/>, that is, the 34public static readonly ReadOnlyAttribute Default = No; 37/// Initializes a new instance of the <see cref='System.ComponentModel.ReadOnlyAttribute'/> class. 48value is ReadOnlyAttribute other && other.IsReadOnly == IsReadOnly;
System.ComponentModel.TypeConverter (8)
System\ComponentModel\ExtendedPropertyDescriptor.cs (3)
34attrList.Add(ReadOnlyAttribute.Yes); 78public override bool IsReadOnly => Attributes[typeof(ReadOnlyAttribute)]!.Equals(ReadOnlyAttribute.Yes);
System\ComponentModel\ReflectPropertyDescriptor.cs (3)
368public override bool IsReadOnly => SetMethodValue == null || ((ReadOnlyAttribute)Attributes[typeof(ReadOnlyAttribute)]!).IsReadOnly; 892attributes.Add(ReadOnlyAttribute.Yes);
System\ComponentModel\TypeConverter.cs (2)
372[DynamicDependency(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor | DynamicallyAccessedMemberTypes.PublicFields, typeof(ReadOnlyAttribute))] 374get { return Attributes.Contains(ReadOnlyAttribute.Yes); }
System.Configuration.ConfigurationManager (2)
System\Configuration\ApplicationSettingsBase.cs (2)
463else if (attribute is ReadOnlyAttribute) 604if (attr is ReadOnlyAttribute)
System.Windows.Forms (5)
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
351_readOnly |= Attributes[typeof(ReadOnlyAttribute)]?.Equals(ReadOnlyAttribute.Yes) ?? false;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1288forceReadOnly = TypeDescriptorHelper.TryGetAttribute(value, out ReadOnlyAttribute? readOnlyAttribute)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.cs (1)
43if ((TypeDescriptorHelper.TryGetAttribute(target, out ReadOnlyAttribute? readOnlyAttribute)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
126if ((TypeDescriptorHelper.TryGetAttribute(Target, out ReadOnlyAttribute? readOnlyAttribute)
System.Windows.Forms.Design (7)
System\ComponentModel\Design\ComponentDesigner.cs (2)
640events[evt.Name] = TypeDescriptor.CreateEvent(evt.ComponentType, evt, ReadOnlyAttribute.Yes); 668properties[prop.Name] = TypeDescriptor.CreateProperty(prop.ComponentType, prop, ReadOnlyAttribute.Yes);
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (2)
65public override bool IsReadOnly => Attributes[typeof(ReadOnlyAttribute)]!.Equals(ReadOnlyAttribute.Yes);
System\ComponentModel\Design\InheritedPropertyDescriptor.cs (3)
84ReadOnlyAttribute.Yes, 117public override bool IsReadOnly => _propertyDescriptor.IsReadOnly || Equals(Attributes[typeof(ReadOnlyAttribute)], ReadOnlyAttribute.Yes);
System.Windows.Forms.Design.Tests (4)
System\ComponentModel\Design\ComponentDesignerTests.cs (4)
2442Assert.True(Assert.IsType<ReadOnlyAttribute>(result.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 2882Assert.True(Assert.IsType<ReadOnlyAttribute>(result.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly);
System.Windows.Forms.Tests (20)
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (18)
28Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 44Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 60Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 76Assert.True(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 92Assert.True(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 506Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 574Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 791Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 856Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly);
System\Windows\Forms\PropertyGridTests.cs (2)
536yield return new object[] { new AttributeCollection([BrowsableAttribute.Yes, ReadOnlyAttribute.Yes]), new AttributeCollection([BrowsableAttribute.Yes, ReadOnlyAttribute.Yes]) };