Add new theme
Is your feature request related to a problem? Please describe
I wanna know how to add new theme. The ThemeType has only light/dark
Describe the solution you'd like
A way to add new theme
Describe alternatives you've considered
No response
Additional context
No response
There is a dictionary to map colors For example, the background(bursh color) color of window is WindowBackground. When the theme is black, the value of WindowBackground is (ff 000000). When the theme is light, the value of WindowBackground is (ff f5f5f5)
The color of all elements such as controls should be semantic. Then the theme determines what color the corresponding semantic color should be.
You can copy the dictionary of the black or light theme in the source code and change the color of the brush to your favorite color
Thank you for your answer
I already copied Black theme and personalized some colors. But how can i apply the theme ? I've tried to replace the URI in the current theme but the app is looking weird after that
You need to show me the screenshots of your key source code and effects.
I suggest you download Src and view its demo.
i've tried something like that. Atm i can't reproduce the exact pattern because i undo it days ago :(
Knwowing that theme is a copy from dark theme but colors in it are changed. With that code nothing happens.

I use wpfui to use its color matching style, so I didn't adjust its color module, but I set up a similar function to adjust the color in order to consider the vision problems of some of my users I wrote you a demo This demo controls the color by writing a class (I am not very familiar with xaml. The correct way is to make xaml instead of cs) This demo realizes color matching switching by clicking the button Here I only make a window background color, and the other models are the same There are three things you need to do:
- Create a class to manage colors (MyColorStyle. cs here)
- Add this resource in the app (if you add it in the window layer, you will not be able to achieve cross-window control)
- Create a setting page for users to click the button to switch styles
After you understand this demo, you can create your own color style in wpfui (but I doubt you need to modify the source code of wpfui)

There are currently no plans to allow custom themes. I am not in favor of freedom of choice in terms of colors and I believe that applications should be as similar as possible to maintain the consistency of the OS's appearance.