OfficeLength
OfficeIMO
A signed document length stored as whole English Metric Units (EMUs).
Inheritance
- ValueType
- OfficeLength
Remarks
Fractional EMUs round to nearest, with midpoint ties away from zero. Arithmetic is checked.
Usage
Explore 153 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 57
- Property OfficeContentSafetyOptions.MaximumTinyFontSize
- Property OfficeChartPointStyle.OutlineWidth
- Property OfficeChartSnapshot.Height
- Property OfficeChartSnapshot.Width
- Property OfficeChartTrendline.Width
- Property OfficeDiagramSnapshot.Height
- Property OfficeDiagramSnapshot.Width
- Property OfficePageSize.Height
- Property OfficePageSize.Width
- Property OfficeTextTabLeaderStyle.FontSize
- Property OfficeTextTabLineLeader.Width
- Property OfficeChartOptions.Height
- Property OfficeChartOptions.Width
- Method OfficeLength.Centimeters
- Method OfficeLength.Emus
- Method OfficeLength.Inches
- Method OfficeLength.Millimeters
- Method OfficeLength.op_Addition
- Method OfficeLength.op_Multiply
- Method OfficeLength.op_Subtraction
- Method OfficeLength.Parse
- Method OfficeLength.Pixels
- Method OfficeLength.Points
- Property OfficeLength.Zero
- Property OfficeSeries.MarkerOutlineWidth
- Property OfficeSeries.MarkerSize
- Property OfficeSeries.StrokeWidth
- Property OfficeThemeChartStyle.AxisFontSize
- Property OfficeThemeChartStyle.GridlineWidth
- Property OfficeThemeChartStyle.LineWidth
- Property OfficeThemeChartStyle.TitleFontSize
- Property OfficeThemeFooter.FontSize
- Property OfficeThemePage.MarginBottom
- Property OfficeThemePage.MarginLeft
- Property OfficeThemePage.MarginRight
- Property OfficeThemePage.MarginTop
- Property OfficeThemeParagraphSpacing.After
- Property OfficeThemeParagraphSpacing.Before
- Property OfficeThemeRule.Width
- Property OfficeThemeSpacing.ListIndent
- Property OfficeThemeSpacing.ParagraphAfter
- Property OfficeThemeSpacing.ParagraphBefore
- Property OfficeThemeSpacing.SlideMarginBottom
- Property OfficeThemeSpacing.SlideMarginLeft
- Property OfficeThemeSpacing.SlideMarginRight
- Property OfficeThemeSpacing.SlideMarginTop
- Property OfficeThemeTableStyle.BorderWidth
- Property OfficeThemeTableStyle.CellPadding
- Property OfficeThemeTypeScale.Body
- Property OfficeThemeTypeScale.Caption
- Property OfficeThemeTypeScale.Heading1
- Property OfficeThemeTypeScale.Heading2
- Property OfficeThemeTypeScale.Heading3
- Property OfficeThemeTypeScale.Heading4
- Property OfficeThemeTypeScale.Heading5
- Property OfficeThemeTypeScale.Heading6
- Property OfficeThemeTypeScale.Title
Accepted by parameters 96
- Constructor OfficeChartPointStyle.OfficeChartPointStyle
- Constructor OfficeChartSnapshot.OfficeChartSnapshot
- Constructor OfficeChartSnapshot.OfficeChartSnapshot
- Method OfficeChartSnapshot.WithSize
- Method OfficeChartSnapshot.WithSize
- Constructor OfficeChartTrendline.OfficeChartTrendline
- Constructor OfficeDiagramSnapshot.OfficeDiagramSnapshot
- Constructor OfficeDiagramSnapshot.OfficeDiagramSnapshot
- Constructor OfficePageSize.OfficePageSize
- Constructor OfficePageSize.OfficePageSize
- Constructor OfficeTextTabLeaderStyle.OfficeTextTabLeaderStyle
- Constructor OfficeTextTabLineLeader.OfficeTextTabLineLeader
- Method OfficeLength.CompareTo
- Method OfficeLength.Equals
- Method OfficeLength.op_Addition
- Method OfficeLength.op_Addition
- Method OfficeLength.op_Equality
- Method OfficeLength.op_Equality
- Method OfficeLength.op_GreaterThan
- Method OfficeLength.op_GreaterThan
- Method OfficeLength.op_GreaterThanOrEqual
- Method OfficeLength.op_GreaterThanOrEqual
- Method OfficeLength.op_Inequality
- Method OfficeLength.op_Inequality
- Method OfficeLength.op_LessThan
- Method OfficeLength.op_LessThan
- Method OfficeLength.op_LessThanOrEqual
- Method OfficeLength.op_LessThanOrEqual
- Method OfficeLength.op_Multiply
- Method OfficeLength.op_Subtraction
- Method OfficeLength.op_Subtraction
- Method OfficeLength.TryParse
- Constructor OfficeSeries.OfficeSeries
- Constructor OfficeSeries.OfficeSeries
- Constructor OfficeSeries.OfficeSeries
- Method OfficeSeries.CreateBubble
- Constructor OfficeThemeChartStyle.OfficeThemeChartStyle
- Constructor OfficeThemeChartStyle.OfficeThemeChartStyle
- Constructor OfficeThemeChartStyle.OfficeThemeChartStyle
- Constructor OfficeThemeChartStyle.OfficeThemeChartStyle
- Method OfficeThemeChartStyle.With
- Method OfficeThemeChartStyle.With
- Method OfficeThemeChartStyle.With
- Method OfficeThemeChartStyle.With
- Constructor OfficeThemeFooter.OfficeThemeFooter
- Method OfficeThemeFooter.With
- Constructor OfficeThemePage.OfficeThemePage
- Constructor OfficeThemePage.OfficeThemePage
- Constructor OfficeThemePage.OfficeThemePage
- Constructor OfficeThemePage.OfficeThemePage
- Method OfficeThemePage.With
- Method OfficeThemePage.With
- Method OfficeThemePage.With
- Method OfficeThemePage.With
- Constructor OfficeThemeParagraphSpacing.OfficeThemeParagraphSpacing
- Constructor OfficeThemeParagraphSpacing.OfficeThemeParagraphSpacing
- Method OfficeThemeParagraphSpacing.With
- Method OfficeThemeParagraphSpacing.With
- Constructor OfficeThemeRule.OfficeThemeRule
- Method OfficeThemeRule.With
- Constructor OfficeThemeSpacing.OfficeThemeSpacing
- Constructor OfficeThemeSpacing.OfficeThemeSpacing
- Constructor OfficeThemeSpacing.OfficeThemeSpacing
- Constructor OfficeThemeSpacing.OfficeThemeSpacing
- Constructor OfficeThemeSpacing.OfficeThemeSpacing
- Constructor OfficeThemeSpacing.OfficeThemeSpacing
- Constructor OfficeThemeSpacing.OfficeThemeSpacing
- Method OfficeThemeSpacing.With
- Method OfficeThemeSpacing.With
- Method OfficeThemeSpacing.With
- Method OfficeThemeSpacing.With
- Method OfficeThemeSpacing.With
- Method OfficeThemeSpacing.With
- Method OfficeThemeSpacing.With
- Constructor OfficeThemeTableStyle.OfficeThemeTableStyle
- Constructor OfficeThemeTableStyle.OfficeThemeTableStyle
- Method OfficeThemeTableStyle.With
- Method OfficeThemeTableStyle.With
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Constructor OfficeThemeTypeScale.OfficeThemeTypeScale
- Method OfficeThemeTypeScale.With
- Method OfficeThemeTypeScale.With
- Method OfficeThemeTypeScale.With
- Method OfficeThemeTypeScale.With
- Method OfficeThemeTypeScale.With
- Method OfficeThemeTypeScale.With
- Method OfficeThemeTypeScale.With
- Method OfficeThemeTypeScale.With
- Method OfficeThemeTypeScale.With
Methods
public static OfficeLength Centimeters(double value) #Creates a length in centimeters (360,000 EMUs per centimeter).
Parameters
- value double
Returns
OfficeLengthpublic int CompareTo(OfficeLength other) #Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Parameters
- other OfficeIMO.OfficeLength
- An object to compare with this instance.
Returns
int A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes in the sort order. Zero This instance occurs in the same position in the sort order as . Greater than zero This instance follows in the sort order.public int CompareTo(object? obj) #Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Parameters
- obj object?
- An object to compare with this instance.
Returns
int A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes in the sort order. Zero This instance occurs in the same position in the sort order as . Greater than zero This instance follows in the sort order.Exceptions
ArgumentException– obj is not the same type as this instance.
public static OfficeLength Emus(long value) #Creates a length from whole EMUs.
Parameters
- value long
Returns
OfficeLengthpublic bool Equals(OfficeLength other) #Indicates whether the current object is equal to another object of the same type.
Parameters
- other OfficeIMO.OfficeLength
- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.public override bool Equals(object? obj) #Indicates whether this instance and a specified object are equal.
Parameters
- obj object?
- The object to compare with the current instance.
Returns
bool true if obj and this instance are the same type and represent the same value; otherwise, false.public override int GetHashCode() #Returns the hash code for this instance.
Returns
int A 32-bit signed integer that is the hash code for this instance.public static OfficeLength Inches(double value) #Creates a length in inches (914,400 EMUs per inch).
Parameters
- value double
Returns
OfficeLengthpublic static OfficeLength Millimeters(double value) #Creates a length in millimeters (36,000 EMUs per millimeter).
Parameters
- value double
Returns
OfficeLengthpublic static OfficeLength op_Addition(OfficeLength left, OfficeLength right) #Adds lengths, throwing on overflow.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
Returns
OfficeLengthpublic static bool op_Equality(OfficeLength left, OfficeLength right) #Compares lengths for equality.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
Returns
boolpublic static bool op_GreaterThan(OfficeLength left, OfficeLength right) #Compares signed lengths.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
Returns
boolpublic static bool op_GreaterThanOrEqual(OfficeLength left, OfficeLength right) #Compares signed lengths.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
Returns
boolpublic static bool op_Inequality(OfficeLength left, OfficeLength right) #Compares lengths for inequality.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
Returns
boolpublic static bool op_LessThan(OfficeLength left, OfficeLength right) #Compares signed lengths.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
Returns
boolpublic static bool op_LessThanOrEqual(OfficeLength left, OfficeLength right) #Compares signed lengths.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
Returns
boolpublic static OfficeLength op_Multiply(OfficeLength length, double scalar) #Multiplies a length by a finite scalar and rounds to whole EMUs.
Parameters
- length OfficeIMO.OfficeLength
- scalar double
Returns
OfficeLengthpublic static OfficeLength op_Multiply(double scalar, OfficeLength length) #Multiplies a length by a finite scalar and rounds to whole EMUs.
Parameters
- scalar double
- length OfficeIMO.OfficeLength
Returns
OfficeLengthpublic static OfficeLength op_Subtraction(OfficeLength left, OfficeLength right) #Subtracts lengths, throwing on overflow.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
Returns
OfficeLengthpublic static OfficeLength Parse(string value) #Parses an invariant number and optional pt, cm, mm, in, px or emu suffix. A bare number means points.
Parameters
- value string
Returns
OfficeLengthpublic static OfficeLength Pixels(double value) #Creates a length in pixels at 96 DPI (9,525 EMUs per pixel).
Parameters
- value double
Returns
OfficeLengthpublic static OfficeLength Points(double value) #Creates a length in points (12,700 EMUs per point).
Parameters
- value double
Returns
OfficeLengthpublic long ToHalfPoints() #Rounds to whole half-points at write time; midpoint ties round away from zero.
Returns
longpublic override string ToString() #Formats in invariant points with up to four decimal places and no trailing zeros.
Returns
stringpublic string ToString(string? format) #Formats in the requested unit, using points when the format is empty or G.
Parameters
- format string?
Returns
stringpublic string ToString(string? format, IFormatProvider? formatProvider) #Formats using pt, cm, mm, in, px or emu. An empty format or G means points.
Parameters
- format string?
- formatProvider System.IFormatProvider?
Returns
stringpublic long ToTwips() #Rounds to whole twips at write time; midpoint ties round away from zero.
Returns
longpublic static bool TryParse(string? value, out OfficeLength result) #Tries to parse an invariant length. Commas, nonfinite values and overflowing lengths are rejected.
Parameters
- value string?
- result OfficeIMO.OfficeLength
Returns
bool