Skip to content

Theme brush rename #2435

@Keboo

Description

@Keboo

Right now there is not a good standardization of brush name, or how to add new brushes to the theme. These have also deviated from the latest material design guidance.

The plan is to introduce the new brush names alongside the current brushes; however the old brushes names should be considered obsolete with the intention to remove them in the 5.x release.

This issue is a request for comment on the design moving forward.

Brush naming rules:

  1. Brush names will be prefixed with "MaterialDesign.Brush."
  2. Foreground brushes will be named with their corresponding brush with ".Foreground" suffix appended
  3. Color resources will be named with their corresponding brush with ".Color" suffix appended
  4. "Mid" or default colors will have "mid" removed from their names for brevity
  5. Brushes used by controls should be prefixed with "MaterialDesign.Brush.."

This will greatly expand the total number of brushes, however with the use of extension methods on ITheme many of these should not need to be set directly unless greater customization is desired.

Feedback?

Here is the current set of theme brushes as well as some of the proposed new names:
PrimaryHueLightBrush => MaterialDesign.Brush.Primary.Light
PrimaryHueLightForegroundBrush => MaterialDesign.Brush.Primary.Light.Foreground
PrimaryHueMidBrush => MaterialDesign.Brush.Primary
PrimaryHueMidForegroundBrush => MaterialDesign.Brush.Primary.Foreground
PrimaryHueDarkBrush => MaterialDesign.Brush.Primary.Dark
PrimaryHueDarkForegroundBrush => MaterialDesign.Brush.Primary.Dark.Foreground
SecondaryHueLightBrush => MaterialDesign.Brush.Secondary.Light
SecondaryHueLightForegroundBrush => MaterialDesign.Brush.Secondary.Light.Foreground
SecondaryHueMidBrush => MaterialDesign.Brush.Secondary
SecondaryHueMidForegroundBrush => MaterialDesign.Brush.Secondary.Foreground
SecondaryHueDarkBrush => MaterialDesign.Brush.Secondary.Dark
SecondaryHueDarkForegroundBrush => MaterialDesign.Brush.Secondary.Dark.Foreground
MaterialDesignValidationErrorBrush => MaterialDesign.Brush..ValidationError
MaterialDesignBackground => (removed; use MaterialDesign.Brush.Background)
MaterialDesignPaper => MaterialDesign.Brush.Background
MaterialDesignCardBackground => MaterialDesign.Brush.Card.Background
MaterialDesignToolBarBackground => MaterialDesign.Brush.ToolBar.Background
MaterialDesignBody => MaterialDesign.Brush.Text.Foreground
MaterialDesignBodyLight => MaterialDesign.Brush.Text.Light.Foreground
MaterialDesignColumnHeader => MaterialDesign.Brush.DataGrid.ColumnHeaderForeground and MaterialDesign.Brush.ListView.GridViewColumnHeaderForeground
MaterialDesignCheckBoxOff => MaterialDesign.Brush.CheckBox.CheckOff
MaterialDesignCheckBoxDisabled => MaterialDesign.Brush.CheckBox.CheckDisabled
MaterialDesignTextBoxBorder => (this brush will need to be multiplied for all controls) MaterialDesign.Brush.TextBox.Border
MaterialDesignDivider => (replaced with control specific brushes)
MaterialDesignSelection => (replaced with control specific brushes)
MaterialDesignToolForeground => (replaced with control specific brushes)
MaterialDesignToolBackground => (replaced with control specific brushes)
MaterialDesignFlatButtonClick => MaterialDesign.Brush.ToolBar.Button.MouseOver
MaterialDesignFlatButtonRipple => MaterialDesign.Brush..RippleFeedback
MaterialDesignToolTipBackground => MaterialDesign.Brush.ToolTip.Background
MaterialDesignChipBackground => MaterialDesign.Brush.Chip.Background
MaterialDesignSnackbarBackground => MaterialDesign.Brush.Snackbar.Background
MaterialDesignSnackbarMouseOver => MaterialDesign.Brush.Snackbar.MouseOver
MaterialDesignSnackbarRipple => MaterialDesign.Brush.Snackbar.RippleFeedback
MaterialDesignTextFieldBoxBackground => (replaced with control specific brushes)
MaterialDesignTextFieldBoxHoverBackground => (replaced with control specific brushes)
MaterialDesignTextFieldBoxDisabledBackground => (replaced with control specific brushes)
MaterialDesignTextAreaBorder => (replaced with control specific brushes)
MaterialDesignTextAreaInactiveBorder => (replaced with control specific brushes)
MaterialDesignDataGridRowHoverBackground => (replaced with control specific brushes)
MaterialDesignLightBackground => [MaterialDesign.Brush.Badged.LightBackground, MaterialDesign.Brush.ColorZone.LightBackground, MaterialDesign.Brush.ComboBox.Popup.LightBackground]
MaterialDesignLightForeground => [MaterialDesign.Brush.Badged.LightForeground, MaterialDesign.Brush.ColorZone.LightForeground, MaterialDesign.Brush.ComboBox.Popup.LightForeground]
MaterialDesignDarkBackground => [MaterialDesign.Brush.Badged.DarkBackground, MaterialDesign.Brush.ColorZone.DarkBackground, MaterialDesign.Brush.ComboBox.Popup.DarkBackground]
MaterialDesignDarkForeground => [MaterialDesign.Brush.Badged.DarkForeground, MaterialDesign.Brush.ColorZone.DarkForeground, MaterialDesign.Brush.ComboBox.Popup.DarkForeground]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions