fix(MetroWindow): add GlowBrush dependency property (fixes #4564) - #4568
fix(MetroWindow): add GlowBrush dependency property (fixes #4564)#4568JyslaFancy wants to merge 1 commit into
Conversation
…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
|
I believe this should be changed in ControlzEx, instead. The GlowBrush/GlowColor issue originated from ControlzEx, after all—¹not MahApps.Metro. /// <inheritdoc cref="GlowWindowBehavior.GlowColor"/>
[Obsolete($"Use {nameof(GlowColor)}")]
public Color? GlowBrush
{
get => this.GlowColor;
set => this.GlowColor = value;
}Or throw P.S. The removal of ¹key-combo'ed em-dash and superscript. They're not LLM-generated. |
In transitive dependency `ControlzEx`, the `ControlzEx.WindowChromeWindow.GlowBrush` property was renamed to `GlowColor`...at some point. See MahApps/MahApps.Metro#4568
|
|
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:
This matches the pattern used by other brush properties on MetroWindow (e.g. NonActiveBorderBrush).