Version

GetCommonCharacterSettings Method

Gets the common character settings across the runs in the specified span.
Syntax
'Declaration
 
Public Function GetCommonCharacterSettings( _
   ByVal span As DocumentSpan, _
   Optional ByVal ignoreLeadingAndTrailingWhitespace As Boolean _
) As CharacterSettings
public CharacterSettings GetCommonCharacterSettings( 
   DocumentSpan span,
   bool ignoreLeadingAndTrailingWhitespace
)

Parameters

span
Document span. If empty then returns the settings of the previous character in the paragraph that contains the span's offset. If there's no previous character then returns the settings of the next character in the paragraph. If the paragraph is empty then returns the paragraph's resolved character settings.
ignoreLeadingAndTrailingWhitespace
Indicates whether to ignore leading and trailing whitespace around the text contained in the specified span.

Return Value

CharacterSettings object that has common settings from the text in the specified span.
Remarks

This method gets common character settings of text contained in the specified span. As an example, if all the text in the span is bold then the returned settings will have CharacterSettings.Bold set to true as well. If all of the text is not bold then the Bold will be set false. However if some text in the span is bold and some is not then the returned settings will have Bold set to null.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also