Class PropertyReadOnlySize
- Namespace
- combit.Reporting.Dom
- Assembly
- combit.ListLabel31.CrossPlatform.dll
Represents a read-only size abstraction consisting of horizontal (width) and vertical (height) components.
public class PropertyReadOnlySize : DomItem
- Inheritance
-
PropertyReadOnlySize
- Inherited Members
Remarks
The individual components are stored as strings because they may represent either literal numeric values or (in broader DOM contexts) expressions/formulas. The Get() helper converts these components to a Size instance by parsing them as 32-bit integers.
Setters for the dimension components are only available in LLCP builds (internally) to support initialization and deserialization scenarios. At runtime for consumers, this object effectively acts as a read-only view.
Properties
Horizontal
Gets the horizontal component (width) of the size as a string (literal or expression).
[JsonInclude]
public string Horizontal { get; }
Property Value
Remarks
In non-LLCP consumer scenarios this value is effectively read-only. When compiled with LLCP, the internal setter enables controlled initialization and deserialization.
Vertical
Gets the vertical component (height) of the size as a string (literal or expression).
[JsonInclude]
public string Vertical { get; }
Property Value
Remarks
Similar to Horizontal, this is exposed as a string to accommodate both constants and potential formula-based values in broader DOM usage patterns.
Methods
Get()
Returns the current size as a Size instance by converting Horizontal and Vertical to integers.
public Size Get()
Returns
Remarks
This method performs a direct conversion without culture-specific formatting logic. If the underlying dimension values represent formulas or non-numeric content, callers should validate or pre-resolve them prior to invocation.
Exceptions
- InvalidCastException
Thrown if either dimension string cannot be converted to a 32-bit integer via ToInt32(object).