Skip to content

fix(MetroWindow): add GlowBrush dependency property (fixes #4564)#4568

Open
JyslaFancy wants to merge 1 commit into
MahApps:developfrom
JyslaFancy:fix/4564-glowbrush-metrowindow
Open

fix(MetroWindow): add GlowBrush dependency property (fixes #4564)#4568
JyslaFancy wants to merge 1 commit into
MahApps:developfrom
JyslaFancy:fix/4564-glowbrush-metrowindow

Conversation

@JyslaFancy

Copy link
Copy Markdown

Fixes #4564 — GlowBrush invalid property on MetroWindow.

Problem

The MahApps.Metro documentation references a GlowBrush property on MetroWindow, but this property was never implemented. Users following the docs example get 'GlowBrush invalid property' at design time.

Root cause

MetroWindow inherits GlowColor (Color?) from ControlzEx.WindowChromeWindow, but no GlowBrush convenience property was exposed.

Fix

Added a GlowBrush dependency property (of type Brush) that wraps the inherited GlowColor:

  • Setting GlowBrush to a SolidColorBrush extracts the Color and assigns it to GlowColor
  • Setting GlowBrush to null clears GlowColor
  • The getter returns the current GlowBrushProperty value

This matches the pattern used by other brush properties on MetroWindow (e.g. NonActiveBorderBrush).

…d GlowColor

The MahApps.Metro documentation references a GlowBrush property on MetroWindow,
but this property was never implemented. Users following the docs example get
'GlowBrush invalid property' at design time.

The MetroWindow already inherits GlowColor (of type Color?) from
ControlzEx.WindowChromeWindow. This commit adds a GlowBrush dependency property
(of type Brush) that wraps GlowColor:
- Setting GlowBrush extracts the Color from a SolidColorBrush and assigns GlowColor
- Getting GlowBrush returns null (the underlying value is GlowColor)
- Setting GlowBrush to null clears GlowColor

Fixes MahApps#4564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

GlowBrush invalid in MetroWindow

1 participant