MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
PrimaryBody and SecondaryBody colors for theme
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 16.3k
- Forks
- 3.5k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 8
Description
For my project I am currently writing a style for RadioButton that is styled as a ChoiceChip (https://material.io/components/chips#choice-chips)
Currently I have the following result:

As you can see the light theme is nice, but unfortunately the foreground color of the dark theme does not have enough contrast.
The problem is that for light theme I need the foreground to be PrimaryHueDarkBrush, but for the dark theme it must be PrimaryHueLightBrush. (Same for Secondary)
I currently think the best way to achieve this is by introducing a PrimaryBody and SecondaryBody color to the theme. The naming because it reacts in a similar way as currently the MaterialDesignBody color does.
I am willing to look into creating a PR with the necessary changes if you also see this as a good solution. Otherwise I hope you can come up with a better solution to fix this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing theme color behavior for PrimaryHueDarkBrush, PrimaryHueLightBrush, Secondary colors, and MaterialDesignBody. Trace how a RadioButton styled as a ChoiceChip selects foreground colors in light and dark themes, then verify that the proposed PrimaryBody and SecondaryBody behavior provides sufficient contrast in both themes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100