6 instantiations of Scope
System.Windows.Forms (2)
System\Windows\Forms\Rendering\GdiCache.cs (1)
95return font is null ? new FontCache.Scope() : s_fontCache.GetEntry(font, quality).CreateScope();
System\Windows\Forms\Rendering\TextRenderer.cs (1)
667return new FontCache.Scope(hfont);
System.Windows.Forms.Primitives (4)
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (3)
37return new PenCache.Scope(pen); 54return new SolidBrushCache.Scope(solidBrush); 77=> width == 1 ? GetPenScope(color) : new PenCache.Scope(new Pen(color, width));
System\Windows\Forms\RefCountedCache.CacheEntry.cs (1)
64public Scope CreateScope() => new(this);
245 references to Scope
System.Windows.Forms (232)
System\Windows\Forms\Control.cs (1)
8954using var brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (5)
391using var brush = color.GetCachedSolidBrushScope(); 499using var pen = color.GetCachedPenScope(); 534using var highlightBrush = colors.Highlight.GetCachedSolidBrushScope(); 539using var shadowBrush = colors.ButtonShadow.GetCachedSolidBrushScope(); 544using var brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (3)
89using var windowFrame = colors.WindowFrame.GetCachedPenScope(); 90using var highlight = colors.Highlight.GetCachedPenScope(); 91using var buttonShadow = colors.ButtonShadow.GetCachedPenScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
77using var brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\FlatButtonDarkModeRenderer.cs (1)
34using var back = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernButtonDarkModeRenderer.cs (4)
106using var borderBrush = borderColor.GetCachedSolidBrushScope(); 117using var brush = backColor.GetCachedSolidBrushScope(); 151using (var gapBrush = gapColor.GetCachedSolidBrushScope()) 161using var ringBrush = ringColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernFlatButtonRenderer.cs (1)
49using (var brush = backColor.GetCachedSolidBrushScope())
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\PopupButtonDarkModeRenderer.cs (4)
43using (var brush = backColor.GetCachedSolidBrushScope()) 154using var topLeftPen = topLeftColor.GetCachedPenScope( 156using var bottomRightPen = bottomRightColor.GetCachedPenScope( 191using var defaultPen =
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (4)
50using var brush = backColor.GetCachedSolidBrushScope(); 78using var focusBrush = focusColor.GetCachedSolidBrushScope(); 203using var topLeftPen = topLeftColor.GetCachedPenScope(borderThickness); 207using var bottomRightPen = bottomRightColor.GetCachedPenScope(borderThickness);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (4)
40using var fieldBrush = field.GetCachedSolidBrushScope(); 41using var dark = colors.ButtonShadow.GetCachedPenScope(); 42using var light = colors.ButtonFace.GetCachedPenScope(); 43using var lightLight = colors.Highlight.GetCachedPenScope();
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
908using (var hfont = GdiCache.GetHFONTScope(Font))
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (4)
85using var b = innerBorderColor.GetCachedSolidBrushScope(); 91using var outerBorderPen = outerBorderColor.GetCachedPenScope(); 107using var innerBorderPen = innerBorderColor.GetCachedPenScope(); 117using var borderPen = borderPenColor.GetCachedPenScope();
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (6)
132using var brush = background.GetCachedSolidBrushScope(); 170using var pen = borderColor.GetCachedPenScope( 223using (var brush = buttonColor.GetCachedSolidBrushScope()) 251using var pen = chevronColor.GetCachedPenScope(stroke); 285using (var backgroundBrush = background.GetCachedSolidBrushScope()) 396using var pen = borderColor.GetCachedPenScope(thickness);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
5669using var brush = SystemColors.HotTrack.GetCachedSolidBrushScope(); 19223using var brush = BackgroundColor.GetCachedSolidBrushScope(); 19267using var brush = BackgroundColor.GetCachedSolidBrushScope(); 19313using var pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope(); 19323using var pen = SystemColors.ControlText.GetCachedPenScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
689using var backBrush = backBrushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
3128using var penBackColor = cellStyle.BackColor.GetCachedPenScope(); 3129using var penGridColor = DataGridView.GridPenColor.GetCachedPenScope(); 3132using var penControlDark = darkColor.GetCachedPenScope(); 3133using var penControlLightLight = lightColor.GetCachedPenScope(); 3150using var dividerWidthBrush = dividerWidthColor.GetCachedSolidBrushScope(); 3185using var dividerHeightColorBrush = dividerHeightColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
1124using var brush = brushColor.GetCachedSolidBrushScope(); 1320using var pen = foreBrushColor.GetCachedPenScope(); 1337using var highBrush = highlight.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
872using var brush = brushColor.GetCachedSolidBrushScope(); 1005using var penControlDark = darkColor.GetCachedPenScope(); 1006using var penControlLightLight = lightColor.GetCachedPenScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1927using var brush = paint && !brushColor.HasTransparency() ? brushColor.GetCachedSolidBrushScope() : default;
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
549using var brush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
780using var brush = paint ? brushColor.GetCachedSolidBrushScope() : default;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
916using var brush = brushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
741using var brush = brushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
689using var brush = brushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (4)
270using var brush = brushColor.GetCachedSolidBrushScope(); 377using var penControlDark = darkColor.GetCachedPenScope(); 383using var penControlLightLight = lightColor.GetCachedPenScope(); 389using var penControlDark = darkColor.GetCachedPenScope();
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
501using var textBrush = ForeColor.GetCachedSolidBrushScope(); 542using var hfont = GdiCache.GetHFONTScope(Font); 589using var boxPen = boxColor.GetCachedPenScope(); 711using var brush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (6)
225using var surfaceBrush = surfaceColor.GetCachedSolidBrushScope(); 347using (var bodyBrush = bodyColor.GetCachedSolidBrushScope()) 364using var headerBrush = headerColor.GetCachedSolidBrushScope(); 368using var borderPen = borderColor.GetCachedPenScope( 472using var pen = borderColor.GetCachedPenScope( 654using var brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
249using var light = ControlPaint.Light(backColor, 1.0f).GetCachedPenScope(); 250using var dark = ControlPaint.Dark(backColor, 0f).GetCachedPenScope();
System\Windows\Forms\Controls\Labels\Label.cs (3)
1063using var hfont = GdiCache.GetHFONTScope(Font); 1121using var hfont = GdiCache.GetHFONTScope(Font); 1283using var brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Labels\LinkLabel.cs (4)
589using var hfont = GdiCache.GetHFONTScope(Font); 1020using var foreBrush = ForeColor.GetCachedSolidBrushScope(); 1021using var linkBrush = LinkColor.GetCachedSolidBrushScope(); 1302using var useBrush = brushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (3)
624using var brush = backColor.GetCachedSolidBrushScope(); 683using var brush = foreColor.GetCachedSolidBrushScope(); 742using var brush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
2328using var pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (1)
95using (var backBrush = BackColor.GetCachedSolidBrushScope())
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
65using var backBrush = Item.BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (1)
97using var backBrush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ListView\ListView.cs (1)
6963using var pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1187using (var hfont = GdiCache.GetHFONTScope(Font))
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
2937using var backgroundBrush = BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SnappableControl.cs (1)
44using var borderPen = BorderColor.GetCachedPenScope();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (2)
136using var topLinePen = OwnerGrid.CategorySplitterColor.GetCachedPenScope(); 153using var topLinePen = OwnerGrid.CategorySplitterColor.GetCachedPenScope();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (9)
1533using var backBrush = backColor.GetCachedSolidBrushScope(); 1543using var linePen = ownerGrid.LineColor.GetCachedPenScope(); 1556using var stripeBrush = ownerGrid.LineColor.GetCachedSolidBrushScope(); 1561using var focusBrush = ownerGrid.SelectedItemWithFocusBackColor.GetCachedSolidBrushScope(); 1590using var textBrush = textColor.GetCachedSolidBrushScope(); 1670using var brush = textColor.GetCachedSolidBrushScope(); 1741using var brush = BackgroundColor.GetCachedSolidBrushScope(); 1746using var pen = penColor.GetCachedPenScope(); 1829using var backBrush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (5)
2388using var brush = color.GetCachedSolidBrushScope(); 3339using var splitterPen = OwnerGrid.LineColor.GetCachedPenScope(SplitterWidth); 3343using var linePen = g.FindNearestColor(OwnerGrid.LineColor).GetCachedPenScope(); 3390using var backBrush = BackColor.GetCachedSolidBrushScope(); 3395using var borderPen = OwnerGrid.ViewBorderColor.GetCachedPenScope();
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2893using var pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
854using var pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (5)
2671using var clientBackgroundBrush = clientBackColor.GetCachedSolidBrushScope(); 2672using var adornerBrush = adornerColor.GetCachedSolidBrushScope(); 2673using var adornerPen = adornerColor.GetCachedPenScope(borderThickness); 2724using var parentBackgroundBrush = parentBackColor.GetCachedSolidBrushScope(); 2785using var focusPen = focusColor.GetCachedPenScope(borderThickness);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
102using var b = colorTable.ComboBoxButtonOnOverflow.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (33)
300using var brush = Application.IsDarkModeEnabled ? 372using var pen = ColorTable.ButtonSelectedBorder.GetCachedPenScope(); 386using var pen = ColorTable.ButtonSelectedBorder.GetCachedPenScope(); 419using (var pen = ColorTable.ToolStripBorder.GetCachedPenScope()) 522using var gripLightBrush = ColorTable.GripLight.GetCachedSolidBrushScope(); 530using var controlTextBrush = SystemColors.ControlText.GetCachedSolidBrushScope(); 586using var pen = borderColor.GetCachedPenScope(); 605using var brush = item.BackColor.GetCachedSolidBrushScope(); 643using var pen = borderColor.GetCachedPenScope(); 656using var brush = item.BackColor.GetCachedSolidBrushScope(); 661using var pen = ColorTable.MenuItemBorder.GetCachedPenScope(); 930using (var brush = overflowBottomLeftShadow.GetCachedSolidBrushScope()) 936using (var brush = overflowTopShadow.GetCachedSolidBrushScope()) 986using (var brush = middleColor.GetCachedSolidBrushScope()) 1057using var brush = fill.GetCachedSolidBrushScope(); 1060using var pen = ColorTable.ButtonSelectedBorder.GetCachedPenScope(); 1094using var pen = ColorTable.MenuBorder.GetCachedPenScope(); 1132using var brush = beginColor.GetCachedSolidBrushScope(); 1184using var brush = ColorTable.ToolStripDropDownBackground.GetCachedSolidBrushScope(); 1196using (var pen = ColorTable.MenuBorder.GetCachedPenScope()) 1204using var brush = ColorTable.ToolStripDropDownBackground.GetCachedSolidBrushScope(); 1268using var pen = overflowBottomLeftShadow.GetCachedPenScope(); 1293using (var brush = overflowTopShadow.GetCachedSolidBrushScope()) 1316using (var brush = overflowButtonGradientBegin.GetCachedSolidBrushScope()) 1350using (var brush = ColorTable.ToolStripGradientMiddle.GetCachedSolidBrushScope()) 1384using (var brush = ColorTable.ToolStripGradientEnd.GetCachedSolidBrushScope()) 1422using var brush = ColorTable.ButtonSelectedHighlight.GetCachedSolidBrushScope(); 1446using var brush = ColorTable.ButtonCheckedHighlight.GetCachedSolidBrushScope(); 1494using var foreColorPen = ColorTable.SeparatorDark.GetCachedPenScope(); 1495using var highlightColorPen = ColorTable.SeparatorLight.GetCachedPenScope(); 1557using var brush = ColorTable.ButtonPressedHighlight.GetCachedSolidBrushScope(); 1588using var brush = item.BackColor.GetCachedSolidBrushScope(); 1594using var pen = ColorTable.ButtonSelectedBorder.GetCachedPenScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
693using var brush = arrowColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (22)
74private static SolidBrushCache.Scope GetDarkModeBrush(Color color) => 82private static PenCache.Scope GetDarkModePen(Color color) => 106using var brush = GetDarkModeBrush(backColor); 184using var borderPen = GetDarkModePen(SystemColors.ControlDark); 215using var borderPen = GetDarkModePen(SystemColors.ControlDark); 239using var highlightBrush = GetDarkModeBrush(SystemColors.Highlight); 291using var fillColor = isPressed 326using var fillColor = splitButton.Pressed 335using var linePen = GetDarkModePen(SystemColors.ControlDark); 377using var leftPen = GetDarkModeColor(SystemColors.ControlDark).GetCachedPenScope(); 382using var rightPen = GetDarkModeColor(SystemColors.ButtonShadow).GetCachedPenScope(); 387using var leftPen = GetDarkModeColor(SystemColors.ButtonShadow).GetCachedPenScope(); 392using var rightPen = GetDarkModeColor(SystemColors.ControlDark).GetCachedPenScope(); 406using var foreColorPen = GetDarkModeColor(SystemColors.ControlDark).GetCachedPenScope(); 411using var darkModePen = GetDarkModeColor(SystemColors.ButtonShadow).GetCachedPenScope(); 434using var fillBrush = item.Pressed 469using var arrowBrush = GetDarkModeColor( 521using var darkColorBrush = GetDarkModeColor(SystemColors.ControlDark).GetCachedSolidBrushScope(); 522using var lightColorBrush = GetDarkModeColor(SystemColors.ControlLight).GetCachedSolidBrushScope(); 582using var marginColorBrush = GetDarkModeBrush(SystemColors.ControlLight); 650using var highLightBrush = GetDarkModeBrush(SystemColors.GrayText); 651using var shadowBrush = GetDarkModeBrush(SystemColors.ButtonShadow);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (4)
111using var backBrush = backColor.GetCachedSolidBrushScope(); 519using var pen = borderColor.GetCachedPenScope(); 644using var brush = SystemColors.Highlight.GetCachedSolidBrushScope(); 763using var foreColorPen = item.ForeColor.GetCachedPenScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
257using var brush = innerBorderColor.GetCachedSolidBrushScope(); 264using var pen = outerBorderColor.GetCachedPenScope();
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
3055using var brush = BackColor.GetCachedSolidBrushScope(); 3355using var pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (3)
1092using var clientBackgroundBrush = clientBackColor.GetCachedSolidBrushScope(); 1093using var adornerPen = adornerColor.GetCachedPenScope(borderThickness); 1164using var focusPen = focusColor.GetCachedPenScope(borderThickness);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
343using var gapBrush = _parent.BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Layout\Containers\SplitContainer.cs (2)
1030using var brush = BackColor.GetCachedSolidBrushScope(); 1563using var solidBrush = BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\ParentBackgroundRenderer.cs (2)
31using var fallbackBrush = fallbackColor.GetCachedSolidBrushScope(); 84using var pen = parentBackColor.GetCachedPenScope(MitigationThickness);
System\Windows\Forms\Printing\PrintPreviewControl.cs (3)
352using var backBrush = backColor.GetCachedSolidBrushScope(); 607using var brush = brushColor.GetCachedSolidBrushScope(); 693using (var brush = ForeColor.GetCachedSolidBrushScope())
System\Windows\Forms\Rendering\Animation\AnimatedFocusIndicatorRenderer.cs (1)
118using var focusPen = color.GetCachedPenScope(borderThickness);
System\Windows\Forms\Rendering\CheckBox\AnimatedCheckGlyphRenderer.cs (1)
137using (var brush = backColor.GetCachedSolidBrushScope())
System\Windows\Forms\Rendering\CheckBox\AnimatedToggleSwitchRenderer.cs (3)
232using var backgroundBrush = backgroundColor.GetCachedSolidBrushScope(); 233using var circleBrush = circleColor.GetCachedSolidBrushScope(); 234using var backgroundPen = borderColor.GetCachedPenScope(metrics.BorderThickness);
System\Windows\Forms\Rendering\ControlPaint_ModernControlButtonRenderer.cs (3)
96using (var backgroundBrush = backgroundColor.GetCachedSolidBrushScope()) 112using var borderPen = borderColor.GetCachedPenScope(); 168using var contentBrush = contentColor.GetCachedSolidBrushScope();
System\Windows\Forms\Rendering\ControlPaint.cs (15)
250using var brush = background.GetCachedSolidBrushScope(); 491using (var brush = backColor.GetCachedSolidBrushScope()) 1097using var darkPen = hls.Darker(1.0f).GetCachedPenScope(); 1102using var lightPen = hls.Lighter(1.0f).GetCachedPenScope(); 1111using var mediumPen = hls.Lighter(0.5f).GetCachedPenScope(); 1136using var lightPen = (stockColor ? SystemColors.ControlLightLight : hls.Lighter(1.0f)).GetCachedPenScope(); 1141using var darkPen = (stockColor ? SystemColors.ControlDarkDark : hls.Darker(1.0f)).GetCachedPenScope(); 1151using var topLeftPen = (!stockColor 1161using var bottomRightPen = (stockColor ? SystemColors.ControlDark : hls.Darker(0.5f)).GetCachedPenScope(); 1190using var pen = color.GetCachedPenScope(); 1957using var bright = GdiPlusCache.GetCachedPenScope(LightLight(backColor)); 1958using var dark = GdiPlusCache.GetCachedPenScope(Dark(backColor)); 2023using var lightBrush = LightLight(color).GetCachedSolidBrushScope(); 2027using var darkBrush = Dark(color).GetCachedSolidBrushScope(); 2085using var borderPen = VisualStyles.VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
125using var backBrush = BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Rendering\GdiCache.cs (1)
91public static FontCache.Scope GetHFONTScope(Font? font, FONT_QUALITY quality = FONT_QUALITY.DEFAULT_QUALITY)
System\Windows\Forms\Rendering\RadioButton\AnimatedRadioGlyphRenderer.cs (3)
136using (var brush = backColor.GetCachedSolidBrushScope()) 163using var outlineBrush = dotOutlineColor.GetCachedSolidBrushScope(); 172using var dotBrush = onColor.GetCachedSolidBrushScope();
System\Windows\Forms\Rendering\TextExtensions.cs (3)
52FontCache.Scope font, 104this FontCache.Scope font, 213FontCache.Scope font,
System\Windows\Forms\Rendering\TextRenderer.cs (4)
365using var hfont = GetFontOrHdcHFONT(font, fontQuality, hdc); 521using var hfont = GetFontOrHdcHFONT(font, FONT_QUALITY.DEFAULT_QUALITY, screen); 544using var hfont = GetFontOrHdcHFONT(font, quality, hdc); 658private static FontCache.Scope GetFontOrHdcHFONT(Font? font, FONT_QUALITY quality, HDC hdc)
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (1)
74using var backBrush = _backColor.GetCachedSolidBrushScope();
System.Windows.Forms.Design (4)
System\Drawing\Design\ColorEditor.ColorPalette.cs (2)
360using var brush = BackColor.GetCachedSolidBrushScope(); 416using var brush = color.GetCachedSolidBrushScope();
System\Drawing\Design\ColorEditor.cs (1)
51using var brush = color.GetCachedSolidBrushScope();
System\Drawing\Design\CursorEditor.CursorUI.cs (1)
69using var brushText = e.ForeColor.GetCachedSolidBrushScope();
System.Windows.Forms.Primitives (9)
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (5)
27private static PenCache.Scope GetPenScope(Color color) 44private static SolidBrushCache.Scope GetSolidBrushScope(Color color) 73internal static PenCache.Scope GetCachedPenScope(this Color color) => GetPenScope(color); 76internal static PenCache.Scope GetCachedPenScope(this Color color, int width) 80internal static SolidBrushCache.Scope GetCachedSolidBrushScope(this Color color) => GetSolidBrushScope(color);
System\Windows\Forms\RefCountedCache.CacheEntry.cs (1)
64public Scope CreateScope() => new(this);
System\Windows\Forms\RefCountedCache.cs (2)
9/// Cache that ref counts handed-out objects via "scopes" <see cref="Scope"/>. 13/// type you would use here. <see cref="Scope"/> is implicitly convertible to this type.
System\Windows\Forms\RefCountedCache.Scope.cs (1)
60public static implicit operator TObject(in Scope scope)