← Back to Home • Next: Input Control →
Confirm paints its output through the same KeyPressStyles regions as
KeyPress, because it is a KeyPress control. The full region list and
recoloring guidance live on the KeyPress → Styles page; this page is a short
pointer.
ℹ️ Styling is per control — there is no global “style all Confirm” API. The only style-related global setting is
PromptPlus.Config.ContrastRatio.
KeyPressStyles regions| Region | What it paints |
|---|---|
Prompt |
The prompt text |
Answer |
The pressed-key answer line |
Description |
The description line under the prompt |
Tooltips |
The Yes/No key-hint line |
Error |
The invalid-key message line |
Use the fluent Styles method exactly as on KeyPress. A Style is a
foreground color and a background color — there is no bold/italic/underline. A bare Color is
accepted as shorthand for a foreground-only style.
using ConsolePlusLibrary;
using PromptPlusLibrary;
PromptPlus.Controls
.Confirm("Apply changes?")
.Styles(KeyPressStyles.Prompt, Color.Yellow) // Color shorthand
.Styles(KeyPressStyles.Error, new Style(Color.Red, Color.Default)) // explicit fg + bg
.Run();
Style type, per-control styling, contrast