2 types derived from Brush
System.Drawing.Common.Tests (2)
System\Drawing\BrushTests.cs (1)
27private class SubBrush : Brush
System\Drawing\PenTests.cs (1)
166public class SubBrush : Brush
73 references to Brush
PresentationUI (1)
MS\Internal\Documents\SignatureSummaryDialog.cs (1)
665Brush brush = isSelected ? SystemBrushes.HighlightText : SystemBrushes.ControlText;
System.Drawing (1)
System.Drawing.cs (1)
7[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Brush))]
System.Drawing.Common.Tests (9)
System\Drawing\BrushesTests.cs (2)
153public static object[] Brush(Func<Brush> getBrush, Color expectedColor) => [getBrush, expectedColor]; 157public void Brushes_Get_ReturnsExpected(Func<Brush> getBrush, Color expectedColor)
System\Drawing\PenTests.cs (5)
22public void Ctor_Brush<T>(T brush, PenType penType) where T : Brush 55public void Ctor_Brush_Width<T>(T brush, float width, PenType expectedPenType) where T : Brush 151public void Brush_SetValid_GetReturnsExpected<T>(T brush, PenType penType) where T : Brush 265public void Color_Set_GetReturnsExpected(Brush brush, PenType penType) 1200private static void VerifyPen<T>(Pen pen, PenType expectedPenType, float expectedWidth) where T : Brush
System\Drawing\SystemBrushesTests.cs (2)
45public static object[] Brush(Func<Brush> getBrush, Color expectedColor) => [getBrush, expectedColor]; 49public void SystemBrushes_Get_ReturnsExpected(Func<Brush> getBrush, Color expectedColor)
System.Windows.Forms (40)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (3)
73internal static Brush CreateDitherBrush(Color color1, Color color2) 99using Brush brush = CreateDitherBrush(color1, color2); 514internal void PaintButtonBackground(PaintEventArgs e, Rectangle bounds, Brush? background)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (2)
22using Brush backgroundBrush = CreateDitherBrush(colors.Highlight, colors.ButtonFace); 68using Brush backgroundBrush = CreateDitherBrush(colors.Highlight, colors.ButtonFace);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
129Brush? backgroundBrush = null;
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
146Brush brush = (comboBox.Enabled) ? SystemBrushes.ControlText : SystemBrushes.ControlDark;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
3594Brush br,
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (4)
90using Brush b = new LinearGradientBrush( 107using Brush b = new LinearGradientBrush( 118using Brush b = new LinearGradientBrush( 128Brush brush;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (9)
576using Brush b = new LinearGradientBrush( 633using Brush b = new LinearGradientBrush( 993using (Brush b = new LinearGradientBrush(beginGradient, beginColor, middleColor, mode)) 1018using Brush b = new LinearGradientBrush(bounds, beginColor, endColor, mode); 1087using Brush b = new LinearGradientBrush( 1413using Brush b = new LinearGradientBrush( 1437using Brush b = new LinearGradientBrush( 1549using Brush b = new LinearGradientBrush( 1646private static Point RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction, Brush brush)
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridColumnStyle.cs (2)
209Brush backBrush, 210Brush foreBrush,
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridTextBoxColumn.cs (2)
74Brush backBrush, 75Brush foreBrush,
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
614private void DrawPages(Graphics g, Rectangle rect, PreviewPageInfo[] pages, Brush backBrush)
System\Windows\Forms\Rendering\ControlPaint.cs (14)
35private static Brush? s_grabBrushPrimary; // brush used for primary grab handles 36private static Brush? s_grabBrushSecondary; // brush used for secondary grab handles 39private static Brush? t_frameBrushActive; // brush used for the active selection frame 44private static Brush? t_frameBrushSelected; // brush used for the inactive selection frame 49private static Brush? t_gridBrush; // brush used to draw a grid 1274Brush brush = Brushes.White; 1320Brush background = ((state & ButtonState.Inactive) == ButtonState.Inactive) 1338Brush background, 1487Brush brush = primary 1872Brush frameBrush = active ? GetActiveBrush(backColor) : GetSelectedBrush(backColor); 2076private static Brush GetActiveBrush(Color backColor) 2184using (Brush brush = new TextureBrush(b)) 2194using (Brush brush = new TextureBrush(b)) 2206private static Brush GetSelectedBrush(Color backColor)
System.Windows.Forms.Design (18)
System\ComponentModel\Design\ByteViewer.cs (3)
140using (Brush brush = new SolidBrush(SystemColors.ControlLightLight)) 195using Brush foreground = new SolidBrush(ForeColor); 223using Brush foreground = new SolidBrush(ForeColor);
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
614using (Brush textBrush = new SolidBrush(textColor))
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
387private Brush WatermarkBrush
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
277Brush foreBrush = new SolidBrush(die.ForeColor);
System\Windows\Forms\Design\ComponentTray.cs (1)
2280Brush foreBrush = new SolidBrush(ForeColor);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
995Brush selectedBrush = new SolidBrush(e.BackColor); 996Brush foreBrush = new SolidBrush(e.ForeColor); 997Brush backBrush = new SolidBrush(_selectedColumns.BackColor);
System\Windows\Forms\Design\DesignerUtils.cs (3)
133public static Brush HoverBrush => s_hoverBrush; 214Brush brush = SystemBrushes.ControlDarkDark; 234Brush brush = style switch
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (1)
145Brush brush = new SolidBrush(borderColor);
System\Windows\Forms\Design\TabOrder.cs (3)
29private readonly Brush _highlightTextBrush; 263Brush brush; 288Brush foreBrush = new SolidBrush(textColor);
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
473using Brush brush = new SolidBrush(Color.FromArgb(50, Color.White));
System.Windows.Forms.Primitives (2)
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (1)
82private static Brush? BrushFromKnownColor(KnownColor color) => color switch
System\Windows\Forms\SystemDrawingExtensions.cs (1)
112internal static Pen CreateStaticPen(this Brush brush, float width = 1.0f)
TestPassApp (1)
PrintingControls.cs (1)
23Brush brush = Brushes.Blue;
WinFormsControlsTest (1)
ListBoxes.cs (1)
36Brush customBrush;