BackgroundStyleReference Class
Background Style Reference.When the object is serialized out as xml, its qualified name is p:bgRef.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Presentation.BackgroundStyleReference
Namespace: DocumentFormat.OpenXml.Presentation
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
<ChildElementInfoAttribute(GetType(RgbColorModelPercentage))> _
<ChildElementInfoAttribute(GetType(RgbColorModelHex))> _
<ChildElementInfoAttribute(GetType(HslColor))> _
<ChildElementInfoAttribute(GetType(SystemColor))> _
<ChildElementInfoAttribute(GetType(SchemeColor))> _
<ChildElementInfoAttribute(GetType(PresetColor))> _
Public Class BackgroundStyleReference _
Inherits OpenXmlCompositeElement
'Usage
Dim instance As BackgroundStyleReference
[ChildElementInfoAttribute(typeof(RgbColorModelPercentage))]
[ChildElementInfoAttribute(typeof(RgbColorModelHex))]
[ChildElementInfoAttribute(typeof(HslColor))]
[ChildElementInfoAttribute(typeof(SystemColor))]
[ChildElementInfoAttribute(typeof(SchemeColor))]
[ChildElementInfoAttribute(typeof(PresetColor))]
public class BackgroundStyleReference : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage <a:scrgbClr>
DocumentFormat.OpenXml.Drawing.RgbColorModelHex <a:srgbClr>
DocumentFormat.OpenXml.Drawing.HslColor <a:hslClr>
DocumentFormat.OpenXml.Drawing.SystemColor <a:sysClr>
DocumentFormat.OpenXml.Drawing.SchemeColor <a:schemeClr>
DocumentFormat.OpenXml.Drawing.PresetColor <a:prstClr>
[ISO/IEC 29500-1 1st Edition]
19.3.1.3 bgRef (Background Style Reference)
This element specifies the slide background is to use a fill style defined in the style matrix. The idx attribute refers to the index of a background fill style or fill style within the presentation's style matrix, defined by the fmtScheme element. A value of 0 or 1000 indicates no background, values 1-999 refer to the index of a fill style within the fillStyleLst element, and values 1001 and above refer to the index of a background fill style within the bgFillStyleLst element. The value 1001 corresponds to the first background fill style, 1002 to the second background fill style, and so on.
[Example:
<p:bgRef idx="2"> <a:schemeClr val="bg2"/> </p:bgRef>
The above code indicates a slide background with the style's second fill style using the second background color of the color scheme.
end example]
[Example:
<p:bgRef idx="1001"> <a:schemeClr val="bg2"/> </p:bgRef>
The above code indicates a slide background with the style's first background fill style using the second background color of the color scheme.
end example]
Parent Elements |
---|
bg (§19.3.1.1) |
Child Elements |
Subclause |
---|---|
hslClr (Hue, Saturation, Luminance Color Model) |
§20.1.2.3.13 |
prstClr (Preset Color) |
§20.1.2.3.22 |
schemeClr (Scheme Color) |
§20.1.2.3.29 |
scrgbClr (RGB Color Model - Percentage Variant) |
§20.1.2.3.30 |
srgbClr (RGB Color Model - Hex Variant) |
§20.1.2.3.32 |
sysClr (System Color) |
§20.1.2.3.33 |
Attributes |
Description |
---|---|
idx (Style Matrix Index) Namespace: .../drawingml/2006/main |
Specifies the style matrix index of the style referred to. The possible values for this attribute are defined by the ST_StyleMatrixColumnIndex simple type (§20.1.10.57). |
[Note: The W3C XML Schema definition of this element’s content model (CT_StyleMatrixReference) is located in §A.4.1. end note]
© ISO/IEC29500: 2008.
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.