Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dark Mode Visual Style Theme Subclass #11985

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Update src/System.Windows.Forms/src/System/Windows/Forms/Controls/Tab…
…Control/TabRenderer.cs

Co-authored-by: Igor Velikorossov <RussKie@users.noreply.github.com>
memoarfaa and RussKie authored Sep 3, 2024
commit fe55b13c89ed1fc96e20a172bec4e07494fb9a3d
Original file line number Diff line number Diff line change
@@ -145,7 +145,7 @@ internal static void DrawTabPage(IDeviceContext deviceContext, Rectangle bounds)
{
#pragma warning disable WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
// Using DarkMode Theme Subclass.
// see https://learn.microsoft.com/en-us/windows/win32/controls/theme-subclasses.
// see https://learn.microsoft.com/windows/win32/controls/theme-subclasses.
VisualStyleElement darkTabPaneElement = VisualStyleElement.CreateElement($"{Control.DarkModeIdentifier}::{Control.NavPaneThemeIdentifier}", 0, 0);
VisualStyleElement lightTabPaneElement = VisualStyleElement.Tab.Pane.Normal;
VisualStyleElement tabPaneElement = Application.IsDarkModeEnabled