A custom UI display section container element that extends Unity's VisualElement with USO UI framework functionality and specialized content display capabilities. Provides enhanced styling, field validation, data binding capabilities, theme integration, and data source management for structured content presentation within the USO UI system.
More...
|
| | UsoUiDisplaySection () |
| | Initializes a new instance of the UsoUiDisplaySection class with default settings. Creates a display section container with USO framework integration, theme loading, and flexible layout configuration.
|
| | UsoUiDisplaySection (string fieldName) |
| | Initializes a new instance of the UsoUiDisplaySection class with the specified field name. Creates a display section container with custom identification for binding and reference purposes.
|
| | UsoUiDisplaySection (string fieldName, Object fieldDatasource) |
| | Initializes a new instance of the UsoUiDisplaySection class with field name and initial data source. Creates a display section container with custom identification and establishes initial data binding relationships.
|
| | UsoUiDisplaySection (string fieldName, Object fieldDatasource, out UsoUiDisplaySection newField) |
| | Initializes a new instance of the UsoUiDisplaySection class with field name, initial data source, and returns a reference. Creates a display section container with custom identification, establishes initial data binding, and provides an out parameter for immediate access.
|
| | UsoUiDisplaySection (string fieldName, out UsoUiDisplaySection newField) |
| | Initializes a new instance of the UsoUiDisplaySection class with field name and returns a reference. Creates a display section container with custom identification and provides an out parameter for immediate access.
|
| void | ApplyBinding (string fieldBindingProp, string fieldBindingPath, BindingMode fieldBindingMode) |
| | Applies data binding to the specified property of this control using Unity's data binding system. Configures the binding with the provided path and mode for automatic data synchronization.
|
| UsoLineItem | GetParentLineItem () |
| | Retrieves the first ancestor UsoLineItem control in the visual tree hierarchy. This is useful for accessing parent container functionality and maintaining proper UI structure.
|
| void | InitElement (string fieldName=null) |
| | Initializes the USO UI element with the specified field name and applies comprehensive styling and theme configuration. This method sets up the basic USO framework integration including theme loading, flexible layout, and styling application.
|
| void | SetFieldStatus (FieldStatusTypes fieldStatus) |
| | Updates the field's status type, which affects its visual appearance and validation state. The status change is automatically reflected in the UI through the FieldStatus property.
|
| void | ShowFieldStatus (bool status) |
| | Controls the visibility and functionality of the field status/validation system. When disabled, removes validation-related styling from the control.
|
| void | UpdateDatasource (Object fieldDatasource=null) |
| | Updates the display section's data source, establishing or clearing data binding relationships for dynamic content management. Manages the connection and disconnection of data sources with proper binding cleanup when necessary.
|
| void | AddToClassList (string className) |
| | Adds the specified CSS class name to this element's class list. This method is inherited from Unity's VisualElement and enables dynamic styling modifications.
|
| void | ClearBindings () |
| | Removes all data binding configurations from this element. This method is inherited from Unity's VisualElement and provides cleanup functionality for data bindings.
|
| void | RemoveFromClassList (string className) |
| | Removes the specified CSS class name from this element's class list. This method is inherited from Unity's VisualElement and provides dynamic styling capabilities.
|
A custom UI display section container element that extends Unity's VisualElement with USO UI framework functionality and specialized content display capabilities. Provides enhanced styling, field validation, data binding capabilities, theme integration, and data source management for structured content presentation within the USO UI system.
This control implements the IUsoUiElement interface to provide consistent behavior across the USO UI framework. It supports field status indicators, automatic data binding capabilities, and custom styling through CSS classes. The control serves as a specialized container for display-oriented content sections, featuring automatic theme loading and flexible layout configuration optimized for content presentation scenarios. It includes comprehensive data source management capabilities with methods for connecting and disconnecting data objects for dynamic content scenarios. Display sections are commonly used for organizing related content, creating structured layouts, and providing consistent presentation containers throughout USO applications. The control automatically loads the USO theme stylesheet and configures flexible growth properties suitable for adaptive content display requirements. The control has field status functionality disabled by default, focusing on its role as a presentation container.
| void GWG.UsoUIElements.UsoUiDisplaySection.ApplyBinding |
( |
string | fieldBindingProp, |
|
|
string | fieldBindingPath, |
|
|
BindingMode | fieldBindingMode ) |
Applies data binding to the specified property of this control using Unity's data binding system. Configures the binding with the provided path and mode for automatic data synchronization.
- Parameters
-
| fieldBindingProp | The property name on this control to bind to. |
| fieldBindingPath | The path to the data source property to bind from. |
| fieldBindingMode | The binding mode that determines how data flows between source and target. |
- Exceptions
-
| Exception | Thrown when binding setup fails. Original exception is preserved and re-thrown. |
While display sections primarily manage content presentation, this method enables binding to container-level properties such as visibility, styling characteristics, or other display-related attributes.
Implements GWG.UsoUIElements.IUsoUiElement.
| void GWG.UsoUIElements.UsoUiDisplaySection.InitElement |
( |
string | fieldName = null | ) |
|
Initializes the USO UI element with the specified field name and applies comprehensive styling and theme configuration. This method sets up the basic USO framework integration including theme loading, flexible layout, and styling application.
- Parameters
-
| fieldName | Optional name to assign to the element. If null, no name is set. |
The initialization process includes setting flexible growth properties for adaptive sizing, loading the USO theme stylesheet from resources for consistent styling, and applying appropriate CSS classes for display section presentation. The method ensures proper integration with the USO framework's theming and styling system.
Implements GWG.UsoUIElements.IUsoUiElement.
| void GWG.UsoUIElements.UsoUiDisplaySection.UpdateDatasource |
( |
Object | fieldDatasource = null | ) |
|
Updates the display section's data source, establishing or clearing data binding relationships for dynamic content management. Manages the connection and disconnection of data sources with proper binding cleanup when necessary.
- Parameters
-
| fieldDatasource | The Unity Object to use as the new data source. Pass null to disconnect the current data source. |
When a non-null data source is provided, the method establishes the binding relationship for content display. When null is provided, it clears all existing bindings and sets the data source to null, enabling clean disconnection of data relationships. This method enables dynamic data source management for scenarios where display content context needs to change during runtime, such as switching between different data objects or clearing content for reset operations.
| bool GWG.UsoUIElements.UsoUiDisplaySection.FieldStatusEnabled |
|
getprivate set |
Gets or sets whether field status/validation functionality is enabled for this control. When enabled, adds validation CSS class for styling. When disabled, removes validation styling.
True if field status functionality is enabled; otherwise, false. Default is false for display sections.
Display sections have field status functionality disabled by default since they primarily serve as content presentation containers rather than interactive or validatable elements.
Implements GWG.UsoUIElements.IUsoUiElement.