TextSpacing Struct
Represents inter-paragraph and inter-line spacing specified either in percentages of the text size or as an absolute value.
public struct TextSpacing : IEquatable<TextSpacing>
Public Structure TextSpacing
Implements IEquatable(Of TextSpacing)
Implements
Fields
Double
Text spacing that is equivalent to 200% of the text size.
Field Value
None
Text spacing is absent (zero).
Field Value
OnePointFiveLines
Text spacing that is equivalent to 150% of the text size.
public static readonly TextSpacing OnePointFiveLines
Public Shared ReadOnly OnePointFiveLines As TextSpacing
Field Value
Single
Text spacing that is equivalent to 100% of the text size.
Field Value
Properties
IsPercent
Gets a value indicating whether this text spacing is specified in percentages.
Property Value
- System.Boolean
true if this text spacing is specified in percentages; otherwise, false.
Percent
Gets the text spacing percentage.
Property Value
- System.Double
The text spacing percentage.
Exceptions
- System.InvalidOperationException
Text spacing is not specified in percentages.
Value
Gets the text spacing value.
Property Value
The text spacing value.
Exceptions
- System.InvalidOperationException
Text spacing is specified in percentages.
Methods
Equals(TextSpacing)
Determines whether the other
TextSpacing is equal to this TextSpacing instance.
public bool Equals(TextSpacing other)
Public Function Equals(other As TextSpacing) As Boolean
Parameters
other
- TextSpacing
The other text spacing to compare with this text spacing instance.
Returns
- System.Boolean
true if the other
TextSpacing is equal to this TextSpacing instance; otherwise, false.
Equals(Object)
Determines whether the specified System.Object is equal to this TextSpacing instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this text spacing instance.
Returns
- System.Boolean
true if the specified System.Object is a TextSpacing and is equal to this TextSpacing instance; otherwise, false.
Overrides
Exactly(Length)
Creates a text spacing instance from the specified absolute value.
public static TextSpacing Exactly(Length value)
Public Shared Function Exactly(value As Length) As TextSpacing
Parameters
value
- Length
The absolute value of the text spacing.
Returns
A text spacing instance that represents the specified absolute text spacing.
Exceptions
- System.ArgumentOutOfRangeException
Argument is not between 0 and 55.88 cm.
GetHashCode()
Returns a hash code for this TextSpacing instance.
Returns
- System.Int32
An integer value that specifies a hash value for this TextSpacing instance.
Overrides
Multiple(Double)
Creates a text spacing instance from the specified percentage value.
If percent
parameter is equal to 1, then returned text spacing is equal to Single. If percent
parameter is equal to 1.5, then returned text spacing is equal to OnePointFiveLines. If percent
parameter is equal to 2, then returned text spacing is equal to Double.
public static TextSpacing Multiple(double percent)
Public Shared Function Multiple(percent As Double) As TextSpacing
Parameters
percent
- System.Double
The percentage value of the text spacing.
Returns
A text spacing instance that represents the specified percentage text spacing.
Exceptions
- System.ArgumentOutOfRangeException
Argument is not between 0 and 10 (exclusive).
ToString()
Returns a System.String that represents this TextSpacing instance.
Returns
- System.String
A System.String that represents this TextSpacing instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).
Operators
Equality(TextSpacing, TextSpacing)
Determines whether first
and second
TextSpacings are equal.
public static bool operator ==(TextSpacing first, TextSpacing second)
Public Shared Operator =(first As TextSpacing, second As TextSpacing) As Boolean
Parameters
first
- TextSpacing
The first text spacing.
second
- TextSpacing
The second text spacing.
Returns
- System.Boolean
true if first
and second
text spacings are equal; otherwise, false.
Inequality(TextSpacing, TextSpacing)
Determines whether first
and second
TextSpacings are not equal.
public static bool operator !=(TextSpacing first, TextSpacing second)
Public Shared Operator <>(first As TextSpacing, second As TextSpacing) As Boolean
Parameters
first
- TextSpacing
The first text spacing.
second
- TextSpacing
The second text spacing.
Returns
- System.Boolean
true if first
and second
text spacings are not equal; otherwise, false.