RelativeScalar Struct
Definition
Defines a scalar value that may be defined relative to a containing element.
public struct RelativeScalar
Constructors
| Name | Description |
|---|---|
| RelativeScalar | Initializes a new instance of the Avalonia.RelativeScalar struct. |
RelativeScalar Constructor
Initializes a new instance of the Avalonia.RelativeScalar struct.
public RelativeScalar(double scalar, Avalonia.RelativeUnit unit)
Parameters
scalar double
The scalar value.
The unit.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetHashCode | No summary available. |
| Parse | Parses a Avalonia.RelativeScalar string. |
| ToString | Returns a String representing this RelativeScalar instance. |
| ToValue | Converts a Avalonia.RelativeScalar into a final value. |
Equals overloads
Equals Method
public bool Equals(Avalonia.RelativeScalar other)
Parameters
other Avalonia.RelativeScalar
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetHashCode Method
public int GetHashCode()
Returns
int
Parse Method
Parses a Avalonia.RelativeScalar string.
public Avalonia.RelativeScalar Parse(string s)
Parameters
s string
The string.
Returns
The parsed Avalonia.RelativeScalar.
ToString Method
Returns a String representing this RelativeScalar instance.
public string ToString()
Returns
string
The string representation.
ToValue Method
Converts a Avalonia.RelativeScalar into a final value.
public double ToValue(double size)
Parameters
size double
Returns
double
The origin point in pixels.
Properties
| Name | Description |
|---|---|
| Beginning | The value at the beginning of the range |
| End | The value at the end of the range |
| Middle | The value at the middle of the range |
| Scalar | Gets the scalar. |
| Unit | Gets the unit. |
Beginning Property
The value at the beginning of the range
public Avalonia.RelativeScalar Beginning { get; set; }
End Property
The value at the end of the range
public Avalonia.RelativeScalar End { get; set; }
Middle Property
The value at the middle of the range
public Avalonia.RelativeScalar Middle { get; set; }
Scalar Property
Gets the scalar.
public double Scalar { get; set; }
Unit Property
Gets the unit.
public Avalonia.RelativeUnit Unit { get; set; }