robot_2Generated
code_blocksInput

Description

The ObjectFit.None field is a member of the Sandbox.UI.ObjectFit enumeration. It specifies that the content should not be resized, meaning it will be displayed at its original size regardless of the size of the element's content box.

Usage

Use ObjectFit.None when you want the content to maintain its original dimensions without any scaling or resizing. This is useful when the exact size of the content is important and should not be altered to fit within a container.

Example

// Example of using ObjectFit.None in a UI component
var imageElement = new ImageElement();
imageElement.Style.ObjectFit = ObjectFit.None;

// This will ensure the image is displayed at its original size
// without any scaling or resizing to fit the container.