question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Brush Naming Conventions

See original GitHub issue

Is your feature request related to a problem? Please describe.

Similar to #3584, the Background and Foreground properties for a number of controls are set to MahApps.Brushes.White and MahApps.Brushes.Black, respectively. As a user, I do not find this to be very intuitive (I expect them to stay white or black, not change depending on the theme).

Describe the solution you’d like

I suggest eliminating replacing the White and Black brushes with the following:

  • White: MahApps.Brushes.Window.Background
  • Black: MahApps.Brushes.Window.Foreground

I would also think that even eliminating the Foreground brush would be ok, as this is usually set by another brush entirely (e.g. MahApps.Brushes.Accent, MahApps.Brushes.Text, or MahApps.Brushes.Label.Text).

Related

Why is there a separate Brush specifically for Label controls? Typically, all foreground colors are the same. If we were to have an alternate Brush for different kinds of text (to give users some flexibility), I’d suggest

  • MahApps.Brushes.Text.Primary
  • MahApps.Brushes.Text.Secondary

We could even go down the Bootstrap methodology and provide a number of preset, overidable brushes (Bootstrap color documentation here):

  • MahApps.Brushes.Text.Primary
  • MahApps.Brushes.Text.Secondary
  • MahApps.Brushes.Text.Success
  • MahApps.Brushes.Text.Danger
  • MahApps.Brushes.Text.Warning
  • MahApps.Brushes.Text.Info
  • MahApps.Brushes.Text.Light
  • MahApps.Brushes.Text.Dark
  • MahApps.Brushes.Text.Body
  • MahApps.Brushes.Text.Muted
  • MahApps.Brushes.Text.White
  • MahApps.Brushes.Text.Black

We could then provide the same Brushes for background use:

  • MahApps.Brushes.Background.Primary
  • MahApps.Brushes.Background.Secondary
  • MahApps.Brushes.Background.Success
  • MahApps.Brushes.Background.Danger
  • MahApps.Brushes.Background.Warning
  • MahApps.Brushes.Background.Info
  • MahApps.Brushes.Background.Light
  • MahApps.Brushes.Background.Dark
  • MahApps.Brushes.Background.White
  • MahApps.Brushes.Background.Black
  • MahApps.Brushes.Background.Transparent

Additional context https://getbootstrap.com/docs/4.3/utilities/colors/

Closed Issues

N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
punker76commented, Nov 17, 2019

@amkuchta

@punker76 any thoughts on this?

I‘m working on it

4reactions
timuniecommented, Aug 27, 2019

If I have a look to this, there are many Brushes that use the same Color. And with MahApps.Brushes.Black and MahApps.Brushes.White I am also with you @amkuchta , that this is a bit confiusing if you are new to the MahApps Theme.

Maybe we should take the chance to reduce the amount of Brushes to a handful amount, with the option for the user to select another Brush in the Style of the control. But that would lead to a complete rewrite of all the Styles we have so far.

@ all: Let’s vote for this idea either with 👍 or 👎 @punker76 If you are with us, I would be happy to help with the rewriting of the Styles.

Happy coding, Tim

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Brush Shape Names, Hair, and Applications
Round Flat Bright Filbert Mottler Liner
Read more >
Tools Help - Painting Digitally
Naming Conventions ; Omitting Brushes; Organising Your Brushes; Brush Settings; Modifying a Brush. Color Swatches. Watercolor/Gouache; Pastels.
Read more >
Telerik Named Brushes - Telerik UI for Universal Windows ...
Telerik Named Brushes is a resource naming convention used throughout Telerik UI components. Each brush used in the default ControlTemplates of the controls ......
Read more >
Telerik Named Brushes | UI for Windows Universal ...
Telerik Named Brushes is a resource naming convention used throughout Telerik UI components. Each brush used in the default ControlTemplates of the controls ......
Read more >
Kyle's brushes - names are too long.
Kyle's brushes are a nice addition, but not very usable thanks to the naming convention. Can we delete "Kyle's concept brushes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found