robot_2Generated
code_blocksInput

Description

The Clamp field is a member of the Sandbox.UI.BackgroundRepeat enumeration. It specifies that the edges of the background image should be stretched to fill any empty space. This is useful when you want the image to cover the entire background area without repeating or leaving gaps.

Usage

Use BackgroundRepeat.Clamp when you want to stretch the edges of a background image to fill the entire area. This can be particularly useful in UI design when you need a seamless background without repeating patterns.

Example

// Example of using BackgroundRepeat.Clamp in a UI component
var panel = new Panel();
panel.Style.BackgroundImage = "path/to/image.png";
panel.Style.BackgroundRepeat = BackgroundRepeat.Clamp;