9 writes to Icon
System.Windows.Forms (2)
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
765
private void ResetIcon() =>
Icon
= DefaultIcon;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
458
_provider.
Icon
= new Icon(icon, (int)(icon.Width * factor), (int)(icon.Height * factor));
System.Windows.Forms.Tests (6)
System\Windows\Forms\ErrorProviderTests.cs (6)
544
Icon
= value
549
provider.
Icon
= value;
561
provider.
Icon
= Icon.FromHandle(new Bitmap(10, 10).GetHicon());
573
provider.
Icon
= Icon.FromHandle(new Bitmap(10, 10).GetHicon());
585
Assert.Throws<ArgumentNullException>("value", () => provider.
Icon
= null);
1336
provider.
Icon
= newIcon;
WinFormsControlsTest (1)
ErrorProviderTest.Designer.cs (1)
47
this.errorProvider2.
Icon
= SystemIcons.Shield;
28 references to Icon
System.Windows.Forms (3)
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (2)
590
internal IconRegion Region => _region ??= new IconRegion(
Icon
);
818
private bool ShouldSerializeIcon() =>
Icon
!= DefaultIcon;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
457
using Icon icon = _provider.
Icon
;
System.Windows.Forms.Tests (25)
System\Windows\Forms\ErrorProviderTests.cs (25)
27
Assert.NotNull(provider.
Icon
);
28
Assert.Same(provider.
Icon
, provider.
Icon
);
31
Assert.Equal(provider.
Icon
.Width, PInvokeCore.GetSystemMetrics(SYSTEM_METRICS_INDEX.SM_CXSMICON));
32
Assert.Equal(provider.
Icon
.Height, PInvokeCore.GetSystemMetrics(SYSTEM_METRICS_INDEX.SM_CYSMICON));
50
Assert.NotNull(provider.
Icon
);
51
Assert.Same(provider.
Icon
, provider.
Icon
);
77
Assert.NotNull(provider.
Icon
);
78
Assert.Same(provider.
Icon
, provider.
Icon
);
546
Assert.Same(value, provider.
Icon
);
550
Assert.Same(value, provider.
Icon
);
557
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ErrorProvider))[nameof(ErrorProvider.
Icon
)];
569
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ErrorProvider))[nameof(ErrorProvider.
Icon
)];
899
Assert.NotNull(provider.
Icon
);
903
Assert.NotNull(provider.
Icon
);
912
Assert.NotNull(provider.
Icon
);
915
Assert.NotNull(provider.
Icon
);
929
Assert.NotNull(provider.
Icon
);
933
Assert.NotNull(provider.
Icon
);
943
Assert.NotNull(provider.
Icon
);
946
Assert.NotNull(provider.
Icon
);
1330
var icon = provider.
Icon
;
1338
Assert.NotNull(provider.
Icon
);