Infragistics(R) NetAdvantage(R) WPF
GetFont(Int32,Int32) Method
See Also  E-mail your feedback on this topic.
Infragistics.Documents.Excel Namespace > FormattedString Class > GetFont Method : GetFont(Int32,Int32) Method

startIndex
The index of the first character the returned font controls.
length
The number of characters after the start index controlled by the returned font.
Gets the font which controls the formatting properties in the string from the specified start index for the specified number of characters.

Syntax

Visual Basic (Declaration) 
Public Overloads Function GetFont( _
   ByVal startIndex As Integer, _
   ByVal length As Integer _
) As FormattedStringFont
C# 
public FormattedStringFont GetFont( 
   int startIndex,
   int length
)

Parameters

startIndex
The index of the first character the returned font controls.
length
The number of characters after the start index controlled by the returned font.

Return Value

A FormattedStringFont instance which controls the formatting of a portion of the string.

Exceptions

ExceptionDescription
System.ArgumentOutOfRangeException is less than zero.
System.ArgumentOutOfRangeException is less than one. A zero length string cannot be controlled by a formatting font.

Remarks

If the start index is greater than or equal to the length of the unformatted string, no exception will be thrown. It will be thrown later when one of the formatting properties of the returned FormattedStringFont is set.

See Also