Skip to content

release-notes in .NET 11 Preview 7 #14743

Description

@LeafShi1

Milestone: 11.0-preview7
Search query: repo:dotnet/winforms is:pr is:merged milestone:"11.0-preview7" label:"releasenotes-candidate"

Summary

⚠ Breaking Change Callout

#14679 changes the value returned by IsSynchronized on ListBox.SelectedIndexCollection and ListBox.IntegerCollection (now false, for consistency with the other ListBox collections). Although the collections were never actually thread-safe, this is an observable change to a public property's return value. Customers who wrote workarounds that branch on the previous IsSynchronized value may find that logic breaks. This should be documented in the release notes as a behavioral/breaking change, not just a bug fix.

Detailed Results

PR Fixed Contents Description Comment
Dark Mode
#14283 System.Windows.Forms.LinkLabel Adds dark-mode link colors — bright blue LinkColor, light-red ActiveLinkColor, light-purple VisitedLinkColor — for readable contrast on dark backgrounds. Include. User-visible dark-mode contrast improvement for a common control.
#14317 System.Windows.Forms.ToolStripRenderer Inverts checked/indeterminate ToolStripMenuItem glyphs when Application.IsDarkModeEnabled, so check marks are visible on dark drop-downs (ContextMenuStrip, MenuStrip, StatusStrip, ToolStrip). Include. Fixes a clear dark-mode visibility defect across multiple menu/strip controls.
#14338 System.Windows.Forms.HelpProvider (Help) Sets HH_POPUP.clrForeground so the pop-up help bubble text color matches the WinForms theme, restoring readable text in dark mode. Include. Fixes a dark-mode regression where help text was barely visible.
#14381 System.Windows.Forms.ToolTip Adds dark-mode support to ToolTip so tooltips honor SystemColorMode.Dark. Include. Fixes a dark-mode regression; user-visible across all controls with tooltips.
#14504 System.Windows.Forms.TabControl In dark-mode child theming, skips applying the generic DarkMode_Explorer theme to nested TabControls, fixing TabControl → SplitContainer → TabControl hierarchies. Include. Fixes visible dark-mode inconsistency in nested container scenarios.
Rendering / Visual Styles
#14424 System.Windows.Forms.PrintPreviewControl Uses ForeColor directly in DrawMessage so an explicitly set White fore color renders as white instead of falling back to black. Include. Fixes a regression introduced in #13863; visible in designer and at runtime.
#14643 System.Windows.Forms.NumericUpDown (UpDownBase) Uses the modern renderer only in dark mode; restores themed and classic DrawScrollButton paths so up/down buttons render correctly when visual styles are disabled. Include. Fixes a rendering regression introduced by #13747.
#14672 System.Windows.Forms.PropertyGrid Fixes large-button image indexing in EnsureLargeButtons() so the Property Page icon is correct in HDPI after toggling LargeButtons from False to True. Include. Fixes a visible HDPI icon regression.
#14572 System.Windows.Forms.PropertyGrid Fixes copy-paste typo so ResetHelpForeColor resets the fore color instead of the back color. Borderline — can be omitted. The method is private with no call sites; no shipped behavior changes (per PR "Customer Impact: None").
Stability / Exception Handling
#14537 System.Windows.Forms.ToolStripDropDownMenu Reverts #14490 and returns early when the last item is already shown, so clicking ToolStripScrollDownButton no longer throws. Include. Fixes a long-standing exception (#6650) that is user-reachable.
#14565 System.Windows.Forms.SplitContainer Wraps RepaintSplitterRect() GDI+ drawing in try/catch (ExternalException) to ignore transient failures during display-session (lock/unlock) transitions. Include. Eliminates intermittent "generic error occurred in GDI+" crash dialogs.
#14731 System.Windows.Forms.KeyboardToolTipStateMachine Replaces a thrown KeyNotFoundException with FullFsmReset() and adds a null check in Transit(), fixing crashes when Focus() is called during a ToolTip Popup event (re-entrant focus change). Include. Fixes an application crash triggered by focus re-entrance during tooltip display.
Input
#14691 System.Windows.Forms.SendKeys Passes modifier state by ref to AddSimpleKey so sequential immediate modifier sequences (^a^c, +a+c, %f%t) parse correctly instead of throwing. Include. Fixes a regression from #3621 affecting .NET Framework migration scenarios.
API Consistency
#14679 System.Windows.Forms.ListBox Overrides IsSynchronized to return false for SelectedIndexCollection and IntegerCollection, making all four ListBox collections consistent (fixes #3088). Include and flag as a potential breaking change. It alters a public property's return value; customer workarounds relying on the old value may break. See the Breaking Change Callout above.

Amendment: .NET 11 VisualStylesMode opt-in renderers

The following behavior is implemented behind the .NET 11 VisualStylesMode opt-in. It changes framework-defined rendering of existing FlatStyle values; it does not add a settable theming surface.

GroupBox FlatStyle behavior

FlatStyle Classic / High Contrast / Disabled Effective Net11+
Standard Classic etched frame Borderless rectangular surface with enlarged caption
Flat Classic flat frame Rounded Windows-accent outline with ambient-size inline caption
Popup Classic popup frame Windows-accent header band with a bordered body
System Native BS_GROUPBOX Native BS_GROUPBOX; intentionally unchanged

The Standard surface moves DisplayRectangle down because its caption is above the body, aligns that caption to Padding, and reserves more content space above than below. Regular ambient fonts use a real installed Semibold face when available; otherwise their weight is preserved. This is the largest compatibility lever in the change. Metric changes are part of the VisualStylesMode opt-in contract, and AutoSize layouts remeasure through the VisualStylesMode change-impact dispatcher.

ComboBox FlatStyle behavior

FlatStyle Classic / High Contrast / Disabled Effective Net11+
Standard Native themed field Rounded field using the TextBoxBase color scheme
Flat Classic flat adapter Square field using the TextBoxBase color scheme
Popup Flat until hover Rounded Standard geometry with Windows-accent border
System Native Native; intentionally unchanged

FlatStyle.Standard enters the WinForms adapter path under an effective Net11-or-later mode. All three modern styles add one logical pixel of framework inset on top of the now designer-visible public Padding. DropDownStyle.Simple remains an embedded composite control, while popup list HWNDs request small rounded corners on Windows 11.

ToggleSwitch and FlatStyle.System

For a two-state CheckBox in an effective Net11-or-later mode, Appearance.ToggleSwitch wins over FlatStyle.System. A native CheckBox cannot draw the requested toggle appearance, so WinForms uses the owner-drawn toggle renderer instead of silently ignoring Appearance or throwing. Every FlatStyle x Appearance x VisualStylesMode combination is covered by a no-throw interaction matrix. See #14754.

Expected Questions

  • Isn't this theming? No new settable surface exists; all three looks are framework-defined renderings of an existing enum under an opt-in mode; colors/metrics derive from system state (accent, dark mode, HC, text scale). Theming remains the business of control vendor partners.
  • Why does System not modernize? It means native rendering by contract; native BS_GROUPBOX/native combo cannot be restyled. Documented, not overlooked.
  • Why does the GroupBox card change DisplayRectangle? Metric changes are what VisualStylesMode opt-in means; correct AutoSize layouts re-measure through the change-impact model; recorded as the change's biggest compat lever in the high-risk doc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-0Work that we can't release without

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions