Table of Contents

Method OnInitializingShadowStyle

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

OnInitializingShadowStyle(ValueChangingEventArgs<ShadowStyles?>)

Called before the Button's initial ShadowStyle is applied during construction. Override to change or suppress the default shadow — set NewValue to the desired style, or set Handled to true to skip applying any shadow.

protected override void OnInitializingShadowStyle(ValueChangingEventArgs<ShadowStyles?> args)

Parameters

args ValueChangingEventArgs<ShadowStyles?>

Event args whose NewValue is pre-set to DefaultShadow. Subclasses that never display a shadow (e.g. ScrollButton or internal buttons used by arrangement UI) should set args.NewValue = null to avoid the create-then-destroy allocation pattern.

Remarks

Sets NewValue to null so that no shadow infrastructure is allocated by default for scroll buttons.