diff --git a/src/System.Windows.Forms/System/Windows/Forms/Controls/TabControl/TabControl.cs b/src/System.Windows.Forms/System/Windows/Forms/Controls/TabControl/TabControl.cs index 73f78d1df17..9c063187ad4 100644 --- a/src/System.Windows.Forms/System/Windows/Forms/Controls/TabControl/TabControl.cs +++ b/src/System.Windows.Forms/System/Windows/Forms/Controls/TabControl/TabControl.cs @@ -1787,9 +1787,19 @@ private bool ShouldSerializeItemSize() return !_padding.Equals(s_defaultPaddingPoint); } - private BOOL StyleChildren(HWND handle) => - PInvoke.SetWindowTheme(handle, $"{DarkModeIdentifier}_{ExplorerThemeIdentifier}", null) - .Succeeded; + private BOOL StyleChildren(HWND handle) + { + // Only apply theme to direct children (TabPages), not to controls within TabPages. + // Controls like ComboBox need their own specific dark mode themes. + HWND parent = PInvoke.GetParent(handle); + if (parent == HWND) + { + return PInvoke.SetWindowTheme(handle, $"{DarkModeIdentifier}_{ExplorerThemeIdentifier}", null) + .Succeeded; + } + + return true; + } /// /// Returns a string representation for this control.