30 instantiations of Icon
System.Windows.Forms (7)
System\Resources\ResxFileRef.Converter.cs (1)
141Icon ico = new(memoryStream);
System\Windows\Forms\Components\ErrorProvider\ErrorProvider.cs (1)
542Icon defaultIcon = new(typeof(ErrorProvider), "Error");
System\Windows\Forms\Components\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
462_provider.Icon = new Icon(icon, (int)(icon.Width * factor), (int)(icon.Height * factor));
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
78internal static Icon ErrorIcon => s_errorIcon ??= new Icon(typeof(DataGridView), "IconInError");
System\Windows\Forms\Design\ComponentEditorPage.cs (1)
93get => _icon ??= new Icon(typeof(ComponentEditorPage), "ComponentEditorPage");
System\Windows\Forms\Form.cs (1)
871s_defaultIcon ??= new Icon(typeof(Form), "wfc");
System\Windows\Forms\MDI\MDIControlStrip.cs (1)
82using Icon smallIcon = new(icon, SystemInformation.SmallIconSize);
System.Windows.Forms.Design (21)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
125using Icon icon = new(typeof(DesignerActionPanel), "Arrow.ico");
System\Drawing\Design\IconEditor.cs (1)
107protected virtual Icon LoadFromStream(Stream stream) => new(stream);
System\Windows\Forms\Design\Behavior\ContainerSelectorGlyph.cs (1)
48_glyph ??= new Icon(typeof(ContainerSelectorGlyph), "MoverGlyph").ToBitmap();
System\Windows\Forms\Design\ImageListImage.cs (1)
54return new ImageListImage((new Icon(stream)).ToBitmap());
System\Windows\Forms\Design\StandardCommandToolStripMenuItem.cs (1)
87_image = new Icon(typeof(ToolStripMenuItem), _name).ToBitmap();
System\Windows\Forms\Design\StandardMenuStripVerb.cs (9)
395image = new Icon(typeof(ToolStripMenuItem), "new").ToBitmap(); 399image = new Icon(typeof(ToolStripMenuItem), "open").ToBitmap(); 403image = new Icon(typeof(ToolStripMenuItem), "save").ToBitmap(); 407image = new Icon(typeof(ToolStripMenuItem), "printPreview").ToBitmap(); 411image = new Icon(typeof(ToolStripMenuItem), "print").ToBitmap(); 415image = new Icon(typeof(ToolStripMenuItem), "cut").ToBitmap(); 419image = new Icon(typeof(ToolStripMenuItem), "copy").ToBitmap(); 423image = new Icon(typeof(ToolStripMenuItem), "paste").ToBitmap(); 427image = new Icon(typeof(ToolStripMenuItem), "help").ToBitmap();
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
88image = new Icon(typeof(ToolStripButton), "blank").ToBitmap();
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
571image = new Icon(typeof(ToolStripButton), "blank").ToBitmap();
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (4)
75item.Image = new Icon(typeof(ToolStripMenuItem), imageName).ToBitmap(); 123Image = new Icon(typeof(ToolStripMenuItem), "image").ToBitmap(), 218_editItemsToolStripMenuItem.Image = new Icon(typeof(ToolStripMenuItem), "editdropdownlist").ToBitmap(); 533image = new Icon(typeof(ToolStripButton), "blank").ToBitmap();
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
797image = new Icon(typeof(ToolStripButton), "blank").ToBitmap();
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
395using Icon icon = new(resourceStream, size.IsEmpty ? SystemIconSize : size); 477return (icon.Width == width && icon.Height == height && !alwaysCreateNew) ? icon : new(icon, width, height);
92 references to Icon
PresentationUI (13)
MS\Internal\Documents\DialogBaseForm.cs (1)
78Icon = (System.Drawing.Icon)Resources.DocumentApplication;
MS\Internal\Documents\RMPublishingDialog.cs (4)
490private void SetupIconButton(Button button, Icon icon, string text, string tooltip) 927(System.Drawing.Icon)Resources.RMPublishingPeoplePicker, 932(System.Drawing.Icon)Resources.RMPublishingEveryone, 937(System.Drawing.Icon)Resources.RMPublishingRemove,
src\wpf\artifacts\obj\PresentationUI\x64\Release\net11.0\MS.Internal.Documents.Resources.cs (8)
64internal static System.Drawing.Icon DocumentApplication { 67return ((System.Drawing.Icon)(obj)); 114internal static System.Drawing.Icon RMPublishingEveryone { 117return ((System.Drawing.Icon)(obj)); 124internal static System.Drawing.Icon RMPublishingPeoplePicker { 127return ((System.Drawing.Icon)(obj)); 134internal static System.Drawing.Icon RMPublishingRemove { 137return ((System.Drawing.Icon)(obj));
System.Drawing (1)
System.Drawing.cs (1)
62[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Icon))]
System.Windows.Forms (65)
System\Drawing\Design\UITypeEditor.cs (1)
57[typeof(Icon)] = $"System.Drawing.Design.IconEditor, {Assemblies.SystemDrawingDesign}",
System\Resources\ResxFileRef.Converter.cs (1)
141Icon ico = new(memoryStream);
System\Windows\Forms\ActiveX\AxHost.cs (1)
3541=> cursor is null ? null : Icon.FromHandle(cursor.Handle).CreateIPictureRCW(copy: true);
System\Windows\Forms\ComponentModel\COM2Interop\COM2PictureConverter.cs (4)
27_pictureType = typeof(Icon); 66_pictureType = typeof(Icon); 67_lastManaged = Icon.FromHandle(extendedHandle); 105if (managedValue is Icon icon)
System\Windows\Forms\Components\ErrorProvider\ErrorProvider.cs (5)
27private Icon? _icon; 41private static Icon? t_defaultIcon; 533private static Icon DefaultIcon 542Icon defaultIcon = new(typeof(ErrorProvider), "Error"); 559public Icon Icon
System\Windows\Forms\Components\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
460Icon icon = _provider.Icon;
System\Windows\Forms\Components\ErrorProvider\ErrorProvider.IconRegion.cs (2)
16private readonly Icon _icon; 18public IconRegion(Icon icon, int currentDpi)
System\Windows\Forms\Components\ImageList\ImageList.cs (3)
293else if (original._image is Icon originalIcon) 348private int AddIconToHandle(Original original, Icon icon) 440if (original._image is Icon originalIcon)
System\Windows\Forms\Components\ImageList\ImageList.ImageCollection.cs (3)
245public void Add(string key, Icon icon) 271public void Add(Icon value) 329else if (original._image is Icon originalIcon)
System\Windows\Forms\Components\ImageList\ImageList.Original.cs (1)
32if (image is not Icon and not Image)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (9)
16private static readonly Type s_defaultTypeIcon = typeof(Icon); 19private static Icon? s_errorIcon; 78internal static Icon ErrorIcon => s_errorIcon ??= new Icon(typeof(DataGridView), "IconInError"); 377if (formattedValue is not Icon ico) 415Icon? ico = null; 418ico = formattedValue as Icon; 556Icon? icon = owningImageColumn.Icon; 783Icon? icon = image is null ? formattedValue as Icon : null;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (3)
15private Icon? _icon; 108public Icon? Icon 228DefaultCellStyle.NullValue is Icon icon &&
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBarPanel.cs (1)
55public Icon Icon
System\Windows\Forms\Design\ComponentEditorPage.cs (2)
14private Icon? _icon; 91public Icon Icon
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogFootnote.cs (1)
92/// <see cref="Drawing.Icon"/> (or from a handle pointer)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (12)
18/// created from an <see cref="Icon"/> instance (or an icon handle). 95private readonly Icon? _ownedIcon; 106/// The <see cref="Icon"/> instance from which this <see cref="TaskDialogIcon"/> 118/// <see cref="Icon"/> instance. 120/// <param name="icon">The <see cref="Icon"/> instance.</param> 124/// The <see cref="Icon"/> instance from which this <see cref="TaskDialogIcon"/> 129public TaskDialogIcon(Icon icon) 150private TaskDialogIcon(Icon icon, bool takeOwnership) 188private static Icon BitmapToIcon(Bitmap bitmap) 194var icon = Icon.FromHandle(handle); 196return (Icon)icon.Clone();
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (1)
375/// <see cref="Drawing.Icon"/> (or from a handle pointer)
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
260using Icon icon = SystemIcons.GetStockIcon(stockIconId, _scaledPictureWidth);
System\Windows\Forms\Form.cs (7)
103private static Icon? s_defaultIcon; 150private Icon? _icon; 151private Icon? _smallIcon; 861internal static Icon DefaultIcon 1002public Icon? Icon 3414Icon? icon = Icon; 6501Icon? icon;
System\Windows\Forms\MDI\MDIControlStrip.cs (3)
81Icon icon = !hIcon.IsNull ? Icon.FromHandle(hIcon) : Form.DefaultIcon; 82using Icon smallIcon = new(icon, SystemInformation.SmallIconSize);
System\Windows\Forms\NotifyIcon.cs (2)
36private Icon? _icon; 204public Icon? Icon
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
186public new Icon? Icon
System.Windows.Forms.Design (9)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
125using Icon icon = new(typeof(DesignerActionPanel), "Arrow.ico");
System\Drawing\Design\CursorEditor.CursorUI.cs (5)
91using Icon wrapper = Icon.FromHandle(cursor.Handle); 92using Icon clone = (Icon)wrapper.Clone(); 93using Icon scaled = ScaleHelper.ScaleSmallIconToDpi(clone, dpi, alwaysCreateNew: true);
System\Drawing\Design\IconEditor.cs (2)
107protected virtual Icon LoadFromStream(Stream stream) => new(stream); 112if (e?.Value is not Icon icon)
System\Windows\Forms\Design\ControlDesigner.cs (1)
2298using Icon err = SystemIcons.GetStockIcon(StockIconId.Error);
System.Windows.Forms.Primitives (4)
System\Drawing\ImageExtensions.cs (1)
27return (Image)(Icon.FromHandle((HICON)handle).Clone());
System\Windows\Forms\Internals\ScaleHelper.cs (3)
395using Icon icon = new(resourceStream, size.IsEmpty ? SystemIconSize : size); 472internal static Icon ScaleSmallIconToDpi(Icon icon, int dpi, bool alwaysCreateNew = false)