Skip to content

Fix NumberBox style#414

Merged
NotYoojun merged 5 commits intoiNKORE-NET:mainfrom
mou-haz:Fix-NumberBox
Jan 13, 2026
Merged

Fix NumberBox style#414
NotYoojun merged 5 commits intoiNKORE-NET:mainfrom
mou-haz:Fix-NumberBox

Conversation

@mou-haz
Copy link
Copy Markdown
Contributor

@mou-haz mou-haz commented Jan 5, 2026

According to the case reported by @Jack251970 in reply, it seems in some cases the included merged resource dictionaries don't provide the correct theme resources (it seems to only provide the light theme resources by default?).

This PR uses a custom RepeatButton style that uses the needed resources instead.

Remaining issues:
Popup icons.

After changes:

numberBox.mp4

@mou-haz mou-haz marked this pull request as draft January 5, 2026 14:53
@mou-haz mou-haz mentioned this pull request Jan 5, 2026
sometimes fontfamily of ContentPresenterEx is not propagated to its textblock content.
In this case, the content of the repeat button is text, so a textblock is used instead.
@Jack251970
Copy link
Copy Markdown
Contributor

@mou-haz Hi, thanks for your fix! It seems that I cannot conduct the test locally and I do not seem to know how to package UI.WPF.Modern locally (at least the nuget packages packaged by the Pack option in VS cannot work). Could you please tell me the steps to test it locally?

@mou-haz
Copy link
Copy Markdown
Contributor Author

mou-haz commented Jan 7, 2026

I use a project reference instead of a nuget (these are the changes i used).
I tried packing the project as nuget and didn't work for me also.
For nuget packing this worked for me.

I think this branch will be better for testing since it also has the expander fix.

Copy link
Copy Markdown
Contributor

@Jack251970 Jack251970 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for me! Thanks for your quick fix!!!❤️

@mou-haz
Copy link
Copy Markdown
Contributor Author

mou-haz commented Jan 7, 2026

It works for me! Thanks for your quick fix!!!❤️

Glad it worked ! you are welcome.

@mou-haz mou-haz marked this pull request as ready for review January 7, 2026 13:49
@NotYoojun NotYoojun requested review from NotYoojun and Copilot January 9, 2026 06:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a theming issue in the NumberBox control where theme resources were not switching properly between light and dark themes. The fix replaces the merged resource dictionaries approach with a custom RepeatButton template that directly references theme resources.

Key changes:

  • Added a custom RepeatButton template with direct DynamicResource references to TextControlButton* resources
  • Removed Grid.Resources section with theme-specific resource mappings
  • Added Foreground and FocusVisualStyle setters to the NumberBoxSpinButtonStyle

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/iNKORE.UI.WPF.Modern.Controls/Controls/Windows/NumberBox/NumberBox.xaml Outdated
Comment thread source/iNKORE.UI.WPF.Modern.Controls/Controls/Windows/NumberBox/NumberBox.xaml Outdated
mou-haz and others added 2 commits January 9, 2026 12:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Jack251970
Copy link
Copy Markdown
Contributor

@NotYoojun Sorry for pinging. Do you have any plan to provide a quick fix version?

@NotYoojun NotYoojun merged commit a738811 into iNKORE-NET:main Jan 13, 2026
1 check passed
@mou-haz mou-haz deleted the Fix-NumberBox branch January 13, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants