We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6377f2e commit 3fa5fe4Copy full SHA for 3fa5fe4
src/System.Windows.Forms/System/Windows/Forms/Controls/Buttons/Button.cs
@@ -154,9 +154,12 @@ public override Image? BackgroundImage
154
{
155
base.BackgroundImage = value;
156
157
- // BackgroundImage changes may affect rendering logic,
158
- // so we manually update the OwnerDraw flag to ensure correct visual behavior.
159
- UpdateOwnerDraw();
+ if (Application.IsDarkModeEnabled)
+ {
+ // BackgroundImage changes may affect rendering logic,
160
+ // so we manually update the OwnerDraw flag to ensure correct visual behavior.
161
+ UpdateOwnerDraw();
162
+ }
163
}
164
165
0 commit comments