Skip to content
Version 2.32.0
↓ Get the launcher

BarElement.LabelColorFn property

Modern primary (left/inside) label colour, evaluated PER REFRESH so it can track which item occupies a reused/pooled row slot — the static LabelColor is captured once and cannot (e.g. the Nearby Monsters list colouring a boss name red vs. an elite yellow in the same recycled row). Returning null falls back to LabelColor if set, else today’s default (white). Default null → unchanged; a Modern bar that sets neither renders the plain white overlay exactly as before. Added as an init property (NOT a ctor param) so the record stays source + binary compatible with already-compiled plugins (see WindowBuilder-Patterns.md “Binary compatibility rules”). Honoured only on the Modern path; the Default bar path keeps using the static LabelColor.

public Func<ColorRgba?>? LabelColorFn { get; set; }