WhiteSpace NoWrap

robot_2Generated
code_blocksInput

Description

The NoWrap field of the WhiteSpace enum represents a CSS white-space property value where sequences of white spaces are collapsed, and line breaks are suppressed. This means that text will not wrap to the next line, and any line breaks in the source will be ignored.

Usage

Use WhiteSpace.NoWrap when you want to ensure that text remains on a single line without wrapping, regardless of the available space. This is useful for maintaining the integrity of text that should not be broken, such as URLs or specific code snippets.

Example

// Example of using WhiteSpace.NoWrap in a UI component
var label = new Label();
label.Style.Set("white-space", WhiteSpace.NoWrap);
label.Text = "This is a long line of text that will not wrap.";