75 references to Properties
System.Windows.Forms.Design (23)
System\Drawing\Design\ToolboxItem.cs (23)
55get => (AssemblyName?)Properties["AssemblyName"]; 56set => Properties["AssemblyName"] = value; 67AssemblyName[]? names = (AssemblyName[]?)Properties["DependentAssemblies"]; 70set => Properties["DependentAssemblies"] = value?.Clone(); 79get => (Bitmap?)Properties["Bitmap"]; 80set => Properties["Bitmap"] = value; 89get => (Bitmap?)Properties["OriginalBitmap"]; 90set => Properties["OriginalBitmap"] = value; 99get => (string?)Properties["Company"]; 100set => Properties["Company"] = value; 114get => (string?)Properties["Description"]; 115set => Properties["Description"] = value; 124get => (string)Properties["DisplayName"]!; 125set => Properties["DisplayName"] = value; 135get => (ICollection)Properties["Filter"]!; 136set => Properties["Filter"] = value; 146get => (bool)Properties["IsTransient"]!; 147set => Properties["IsTransient"] = value; 171get => (string)Properties["TypeName"]!; 172set => Properties["TypeName"] = value; 350Properties[entry.Name] = entry.Value; 709List<string> propertyNames = new(Properties.Count); 710foreach (DictionaryEntry de in Properties)
System.Windows.Forms.Design.Tests (52)
System\Drawing\Design\ToolboxItemTests.cs (52)
31Assert.Empty(item.Properties); 32Assert.Same(item.Properties, item.Properties); 33Assert.False(item.Properties.IsFixedSize); 34Assert.False(item.Properties.IsReadOnly); 57Assert.Null(item.Properties["AssemblyName"]); 65Assert.Equal(value.FullName, ((AssemblyName)item.Properties["AssemblyName"]).FullName); 66Assert.NotSame(value, item.Properties["AssemblyName"]); 67Assert.NotSame(item.Properties["AssemblyName"], item.Properties["AssemblyName"]); 76Assert.Null(item.Properties["AssemblyName"]); 84Assert.Equal(value.FullName, ((AssemblyName)item.Properties["AssemblyName"]).FullName); 85Assert.NotSame(value, item.Properties["AssemblyName"]); 86Assert.NotSame(item.Properties["AssemblyName"], item.Properties["AssemblyName"]); 95Assert.Throws<ArgumentException>("value", () => item.Properties.Add("AssemblyName", new object())); 113Assert.Same(value, item.Properties["Bitmap"]); 118Assert.Same(value, item.Properties["Bitmap"]); 125Assert.Throws<ArgumentException>("value", () => item.Properties.Add("Bitmap", new object())); 137Assert.Equal(expected, item.Properties["Company"]); 142Assert.Equal(expected, item.Properties["Company"]); 149Assert.Throws<ArgumentException>("value", () => item.Properties.Add("Company", new object())); 171Assert.Null(item.Properties["DependentAssemblies"]); 177Assert.Equal(value, item.Properties["DependentAssemblies"]); 178Assert.NotSame(value, item.Properties["DependentAssemblies"]); 186Assert.Null(item.Properties["DependentAssemblies"]); 192Assert.Equal(value, item.Properties["DependentAssemblies"]); 193Assert.NotSame(value, item.Properties["DependentAssemblies"]); 201Assert.Throws<ArgumentException>("value", () => item.Properties.Add("DependentAssemblies", new object())); 213Assert.Equal(expected, item.Properties["Description"]); 218Assert.Equal(expected, item.Properties["Description"]); 225Assert.Throws<ArgumentException>("value", () => item.Properties.Add("Description", new object())); 237Assert.Equal(expected, item.Properties["DisplayName"]); 242Assert.Equal(expected, item.Properties["DisplayName"]); 249Assert.Throws<ArgumentException>("value", () => item.Properties.Add("DisplayName", new object())); 269Assert.Equal(expected, item.Properties["Filter"]); 274Assert.Equal(expected, item.Properties["Filter"]); 281Assert.Throws<ArgumentException>("value", () => item.Properties.Add("Filter", new object())); 293Assert.Equal(value, item.Properties["IsTransient"]); 298Assert.Equal(value, item.Properties["IsTransient"]); 305Assert.Throws<ArgumentNullException>("value", () => item.Properties.Add("IsTransient", null)); 312Assert.Throws<ArgumentException>("value", () => item.Properties.Add("IsTransient", new object())); 324Assert.Same(value, item.Properties["OriginalBitmap"]); 329Assert.Same(value, item.Properties["OriginalBitmap"]); 336Assert.Throws<ArgumentException>("value", () => item.Properties.Add("OriginalBitmap", new object())); 348Assert.Equal(expected, item.Properties["TypeName"]); 353Assert.Equal(expected, item.Properties["TypeName"]); 360Assert.Throws<ArgumentException>("value", () => item.Properties.Add("TypeName", new object())); 1453Assert.True(item.Properties.IsFixedSize); 1454Assert.True(item.Properties.IsReadOnly); 1459Assert.True(item.Properties.IsFixedSize); 1460Assert.True(item.Properties.IsReadOnly);