DisplayMode Contents

robot_2Generated
code_blocksInput

Description

The Contents field of the DisplayMode enumeration in the Sandbox.UI namespace is used to specify that an element's children should be rendered as if they were direct children of the element's parent, effectively ignoring the element itself. This is particularly useful when you want to bypass a wrapper element in the UI layout.

Usage

To use the Contents display mode, set the display property of a UI element to DisplayMode.Contents. This will make the element's children appear as if they are direct children of the element's parent, which can be useful for simplifying the DOM structure or when a wrapper element is not needed for styling or layout purposes.

Example

// Example of using DisplayMode.Contents
var myElement = new UIElement();
myElement.Display = DisplayMode.Contents;

// This will cause myElement's children to be treated as if they are direct children of myElement's parent.