Compartir a través de


Highlight Class

Defines the Highlight Class.When the object is serialized out as xml, its qualified name is w:highlight.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.Highlight

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaración
Public Class Highlight _
    Inherits OpenXmlLeafElement
'Uso
Dim instance As Highlight
public class Highlight : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1ª edición]

17.3.2.15 highlight (Text Highlighting)

This element specifies a highlighting color which is applied as a background behind the contents of this run.

If this run has any background shading specified using the shd element (§17.3.2.32), then the background shading shall be superseded by the highlighting color when the contents of this run are displayed.

If this element is not present, the default value is to leave the formatting applied at previous level in the style hierarchy. If this element is never applied in the style hierarchy, then text highlighting shall not be applied to the contents of this run.

[Example: Consider a run within a paragraph which has run shading applied as well as yellow text highlighting using the highlight element. This formatting is specified using the following WordprocessingML:

<w:rPr>
  <w:highlight w:val="yellow" /> 
  <w:shd w:themeFill="accent2" w:themeFillTint="66" /> 
</w:rPr>

The resulting run would have yellow highlighting visible over its contents, as the highlighting supersedes the shading for the contents of the run. end example]

Parent Elements

rPr (§17.3.1.29); rPr (§17.3.1.30); rPr (§17.5.2.28); rPr (§17.9.25); rPr (§17.7.9.1); rPr (§17.7.5.4); rPr (§17.3.2.28); rPr (§17.5.2.27); rPr (§17.7.6.2); rPr (§17.3.2.27)

Attributes

Description

val (Highlighting Color)

Specifies the color of the text highlighting which shall be applied to the contents of this run.

[Example: Consider a text run which must be displayed with colored text highlighting. This highlighting would be specified using the following WordprocessingML:

<w:rPr>
  <w:highlight w:val="red" />
</w:rPr>

The resulting text highlighting would be red, as this is the color specified by the val attribute. end example]

The possible values for this attribute are defined by the ST_HighlightColor simple type (§17.18.40).

[Note: The W3C XML Schema definition of this element's content model (CT_Highlight) is located in §A.1. end note]

© ISO/IEC29500: 2008. Los extractos anteriores han sido traducidos del inglés al español por Microsoft (o algunos de sus agentes) e ISO no asume ningún tipo de responsabilidad por dichas traducciones.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Highlight Members

DocumentFormat.OpenXml.Wordprocessing Namespace