A custom line item container element that extends Unity's VisualElement with USO UI framework functionality and hierarchical organization capabilities. Provides enhanced styling, field validation, data binding capabilities, validation state management, and integration with the USO UI system for structured content organization.
More...
|
| | UsoLineItem () |
| | Initializes a new instance of the UsoLineItem class with default settings. Creates a line item container with USO framework integration and validation functionality enabled.
|
| | UsoLineItem (string fieldName) |
| | Initializes a new instance of the UsoLineItem class with the specified field name. Creates a line item container with custom identification for binding and reference purposes.
|
| 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.
|
| List< UsoLineItem > | GetChildLineItems () |
| | Retrieves a list of direct child UsoLineItem elements within this line item's hierarchy. This method provides access to nested line item structures for validation coordination and hierarchical management.
|
| 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 necessary styling classes. This method sets up the basic USO framework integration for the control.
|
| 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 | 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 line item container element that extends Unity's VisualElement with USO UI framework functionality and hierarchical organization capabilities. Provides enhanced styling, field validation, data binding capabilities, validation state management, and integration with the USO UI system for structured content organization.
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 fundamental organizational unit within the USO framework, designed for creating structured layouts with hierarchical relationships between form elements and content sections. It includes validation state tracking through the IsValidated property and provides methods for querying child line item relationships within the UI hierarchy. Line items are commonly used as containers for form rows, content sections, and organizational groupings that require consistent styling and validation management throughout the application. The control enables nested line item structures for complex UI organizations while maintaining framework consistency and parent-child relationship management.
| void GWG.UsoUIElements.UsoLineItem.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 line items typically manage child element bindings, this method enables binding to container-level properties such as visibility, validation states, or other organizational characteristics.
Implements GWG.UsoUIElements.IUsoUiElement.
| bool GWG.UsoUIElements.UsoLineItem.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 true for line items.
Unlike some other USO container elements, line items have field status functionality enabled by default since they commonly participate in validation scenarios and form organization.
Implements GWG.UsoUIElements.IUsoUiElement.
| bool GWG.UsoUIElements.UsoLineItem.IsValidated |
|
getset |
Gets or sets a value indicating whether this line item has passed validation checks. This property is used for tracking validation state within forms and structured layouts.
True if the line item and its contents have been validated successfully; otherwise, false.
This property provides a way to track validation state at the line item level, enabling form validation systems to coordinate validation results across hierarchical content structures. It can be used in conjunction with field status indicators to provide comprehensive validation feedback.