Struct LayoutDimension
Definition
- Assembly:
- Tizen.NUI.dll
The LayoutDimension structure defines the size of a view in layout.
public struct LayoutDimension
Fields
View SourceMatchParent
Constant value that indicates MatchParent for LayoutDimension. For example, LayoutDimension layoutWidth = LayoutDimension.MatchParent;
Declaration
public const float MatchParent
Field Value
| Type | Description |
|---|---|
| float |
WrapContent
Constant value that indicates WrapContent for LayoutDimension. For example, LayoutDimension layoutWidth = LayoutDimension.WrapContent;
Declaration
public const float WrapContent
Field Value
| Type | Description |
|---|---|
| float |
Properties
View SourceIsFixedValue
Gets whether the size is fixed value or not. If it's fixed value, then the value is valid.
Declaration
public bool IsFixedValue { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceEquals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Operators
View Sourceoperator +(float, LayoutDimension)
Addition operator for LayoutDimension. If the size is fixed value, then it adds the value to the given float. Otherwise, it returns the given float. For example, float width = 10 + layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static float operator +(float a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| float | a | A |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| float | The sum of a float value and the fixed value of LayoutDimension. |
operator +(LayoutDimension, float)
Addition operator for LayoutDimension. If the size is fixed value, then it adds the value to the given float. Otherwise, it returns the given float. For example, float width = layoutWidth + 10; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static float operator +(LayoutDimension a, float b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| float | b | A |
Returns
| Type | Description |
|---|---|
| float | The sum of the fixed value of LayoutDimension and a float value. |
operator /(float, LayoutDimension)
Division operator for LayoutDimension. If the size is fixed value, then it divides the value by the given float. Otherwise, it returns the given float. For example, float width = 10 / layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static float operator /(float a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| float | a | A |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| float | The division of a float value and the fixed value of LayoutDimension. |
operator /(LayoutDimension, float)
Division operator for LayoutDimension. If the size is fixed value, then it divides the value by the given float. Otherwise, it returns the negative of the given float. For example, float width = layoutWidth / 10; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static float operator /(LayoutDimension a, float b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| float | b | A |
Returns
| Type | Description |
|---|---|
| float | The division of the fixed value of LayoutDimension and a float value. |
operator ==(LayoutDimension, LayoutDimension)
Equality operator for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values.
Declaration
public static bool operator ==(LayoutDimension a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| bool |
operator >(LayoutDimension, LayoutDimension)
Comparison operators for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values. Otherwise, it returns false.
Declaration
public static bool operator >(LayoutDimension a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| bool |
operator >=(LayoutDimension, LayoutDimension)
Comparison operators for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values. Otherwise, it returns false.
Declaration
public static bool operator >=(LayoutDimension a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| bool |
implicit operator LayoutDimension(float)
Creates a LayoutDimension from a float value. It's used implicitly. For example, LayoutDimension layoutWidth = 100; // Fixed value 100.0f.
Declaration
public static implicit operator LayoutDimension(float value)
Parameters
| Type | Name | Description |
|---|---|---|
| float | value |
Returns
| Type | Description |
|---|---|
| LayoutDimension |
implicit operator float(LayoutDimension)
Converts LayoutDimension to float. It's used implicitly. For example, float width = layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static implicit operator float(LayoutDimension layoutDimension)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | layoutDimension | The LayoutDimension converted to float. |
Returns
| Type | Description |
|---|---|
| float |
operator !=(LayoutDimension, LayoutDimension)
Inequality operator for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values.
Declaration
public static bool operator !=(LayoutDimension a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| bool |
operator <(LayoutDimension, LayoutDimension)
Comparison operators for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values. Otherwise, it returns false.
Declaration
public static bool operator <(LayoutDimension a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| bool |
operator <=(LayoutDimension, LayoutDimension)
Comparison operators for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values. Otherwise, it returns false.
Declaration
public static bool operator <=(LayoutDimension a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| bool |
operator *(float, LayoutDimension)
Multiplication operator for LayoutDimension. If the size is fixed value, then it multiplies the value with the given float. Otherwise, it returns the given float. For example, float width = 10 * layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static float operator *(float a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| float | a | A |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| float | The multiplication of a float value and the fixed value of LayoutDimension. |
operator *(LayoutDimension, float)
Multiplication operator for LayoutDimension. If the size is fixed value, then it multiplies the value with the given float. Otherwise, it returns the negative of the given float. For example, float width = layoutWidth * 10; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static float operator *(LayoutDimension a, float b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| float | b | A |
Returns
| Type | Description |
|---|---|
| float | The multiplication of the fixed value of LayoutDimension and a float value. |
operator -(float, LayoutDimension)
Subtraction operator for LayoutDimension. If the size is fixed value, then it subtracts the value from the given float. Otherwise, it returns the given float. For example, float width = 10 - layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static float operator -(float a, LayoutDimension b)
Parameters
| Type | Name | Description |
|---|---|---|
| float | a | A |
| LayoutDimension | b | A LayoutDimension on the right hand side. |
Returns
| Type | Description |
|---|---|
| float | The subtraction of a float value and the fixed value of LayoutDimension. |
operator -(LayoutDimension, float)
Subtraction operator for LayoutDimension. If the size is fixed value, then it subtracts the value from the given float. Otherwise, it returns the negative of the given float. For example, float width = layoutWidth - 10; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.
Declaration
public static float operator -(LayoutDimension a, float b)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDimension | a | A LayoutDimension on the left hand side. |
| float | b | A |
Returns
| Type | Description |
|---|---|
| float | The subtraction of the fixed value of LayoutDimension and a float value. |