a:noFill (No Fill)
Specifies that a shape has no fill; used to override inherited fill properties.
Description
\:noFill\ is the DrawingML element that explicitly sets a shape to have no fill. It is defined in ECMA-376 Part 1 §20.1.8.26.
No-fill shapes display only their outline/border (if \:ln\ is present) or appear transparent/hollow. This is commonly used for:
- Creating outlined shapes without background
- Allowing background content to show through shapes
- Overriding inherited fill properties from master slides or themes
- Creating wireframe/sketch-like designs
- Container shapes that should be invisible
No fill differs from:
- Solid fill (\:solidFill) — Fills with a single color
- Gradient fill (\:gradFill) — Fills with color gradient
- Pattern fill (\:pattFill) — Fills with pattern
- Picture fill (\:blipFill) — Fills with image
Attributes
| Attribute | Type | Values | Description |
|---|---|---|---|
| (none) | - | - | \:noFill\ has no attributes or child elements. It is a self-contained element. |
Content Model
\:noFill\ has no child elements. It is a simple, empty element:
xml
<a:noFill/>
This element structure indicates “no fill” when present in shape properties.
Examples
Simple Shape with No Fill (Outline Only)
<a:spPr>
<a:xfrm>
<a:off x="1000000" y="1000000"/>
<a:ext cx="3000000" cy="2000000"/>
</a:xfrm>
<a:noFill/>
<a:ln w="25400">
<a:solidFill><a:srgbClr val="000000"/></a:solidFill>
</a:ln>
</a:spPr>
using DocumentFormat.OpenXml.Drawing;
var shapeProperties = new ShapeProperties();
var transform = new Transform2D();
transform.Append(new Offset { X = 1000000, Y = 1000000 });
transform.Append(new Extents { Cx = 3000000, Cy = 2000000 });
shapeProperties.Append(transform);
shapeProperties.Append(new NoFill()); // No fill
var line = new Outline { Width = 25400 }; // Black outline
var solidFill = new SolidFill();
var rgbColor = new RgbColorModelHex { Val = "000000" };
solidFill.Append(rgbColor);
line.Append(solidFill);
shapeProperties.Append(line);
Transparent Container Shape
<a:sp>
<a:nvSpPr>
<a:cNvPr id="2" name="Transparent Box"/>
<a:cNvSpPr/>
<a:nvPr/>
</a:nvSpPr>
<a:spPr>
<a:xfrm>
<a:off x="0" y="0"/>
<a:ext cx="9144000" cy="6858000"/>
</a:xfrm>
<a:noFill/>
</a:spPr>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:t>Content shows through</a:t>
</a:r>
</a:p>
</a:txBody>
</a:sp>
var shape = new Shape();
// Shape properties
var shapeProperties = new ShapeProperties();
var transform = new Transform2D();
transform.Append(new Offset { X = 0, Y = 0 });
transform.Append(new Extents { Cx = 9144000, Cy = 6858000 });
shapeProperties.Append(transform);
shapeProperties.Append(new NoFill()); // Transparent
shape.Append(shapeProperties);
// Text body
var textBody = new TextBody();
textBody.Append(new BodyProperties());
textBody.Append(new ListStyle());
var paragraph = new Paragraph();
var run = new Run();
run.Append(new Text("Content shows through"));
paragraph.Append(run);
textBody.Append(paragraph);
shape.Append(textBody);
Overriding Inherited Fill
<a:spPr>
<a:xfrm>
<a:off x="2000000" y="2000000"/>
<a:ext cx="4000000" cy="3000000"/>
</a:xfrm>
<!-- Override any inherited fill from master/theme -->
<a:noFill/>
<a:ln w="12700">
<a:solidFill><a:srgbClr val="4472C4"/></a:solidFill>
</a:ln>
<a:effectLst/>
</a:spPr>
var shapeProperties = new ShapeProperties();
// Transform
var transform = new Transform2D();
transform.Append(new Offset { X = 2000000, Y = 2000000 });
transform.Append(new Extents { Cx = 4000000, Cy = 3000000 });
shapeProperties.Append(transform);
// No fill — overrides any inherited fill
shapeProperties.Append(new NoFill());
// Blue outline
var line = new Outline { Width = 12700 };
var solidFill = new SolidFill();
solidFill.Append(new RgbColorModelHex { Val = "4472C4" });
line.Append(solidFill);
shapeProperties.Append(line);
// Empty effect list
shapeProperties.Append(new EffectList());
Wireframe Diagram (No Fill, Colored Outline)
<a:spPr>
<a:xfrm>
<a:off x="1000000" y="1000000"/>
<a:ext cx="5000000" cy="3000000"/>
</a:xfrm>
<a:noFill/>
<a:ln w="19050">
<a:solidFill><a:srgbClr val="ED7D31"/></a:solidFill>
<a:prstDash val="dash"/>
</a:ln>
</a:spPr>
var shapeProperties = new ShapeProperties();
var transform = new Transform2D();
transform.Append(new Offset { X = 1000000, Y = 1000000 });
transform.Append(new Extents { Cx = 5000000, Cy = 3000000 });
shapeProperties.Append(transform);
shapeProperties.Append(new NoFill());
// Orange dashed outline
var line = new Outline { Width = 19050 };
var solidFill = new SolidFill();
solidFill.Append(new RgbColorModelHex { Val = "ED7D31" });
line.Append(solidFill);
line.Append(new PresetDash { Val = PresetDashValues.Dash });
shapeProperties.Append(line);
Nested Container (Grouped Shapes)
<a:grpSpPr>
<a:xfrm>
<a:off x="0" y="0"/>
<a:ext cx="10000000" cy="8000000"/>
<a:chOff x="0" y="0"/>
<a:chExt cx="10000000" cy="8000000"/>
</a:xfrm>
<a:noFill/>
<a:ln>
<a:noFill/>
</a:ln>
</a:grpSpPr>
var groupShapeProperties = new GroupShapeProperties();
var transform = new Transform2D();
transform.Append(new Offset { X = 0, Y = 0 });
transform.Append(new Extents { Cx = 10000000, Cy = 8000000 });
transform.Append(new ChildOffset { X = 0, Y = 0 });
transform.Append(new ChildExtents { Cx = 10000000, Cy = 8000000 });
groupShapeProperties.Append(transform);
groupShapeProperties.Append(new NoFill());
var line = new Outline();
line.Append(new NoFill());
groupShapeProperties.Append(line);
Fill Priority and Inheritance
When fill is specified in shape properties:
| Element | Meaning | Precedence |
|---|---|---|
| \:solidFill\ | Solid color fill | 1st (explicit) |
| \:gradFill\ | Gradient fill | 1st (explicit) |
| \:pattFill\ | Pattern fill | 1st (explicit) |
| \:blipFill\ | Picture fill | 1st (explicit) |
| \:grpFill\ | Use fill from group | Fallback |
| \:noFill\ | No fill (transparent) | Overrides all |
Key point: \:noFill\ explicitly overrides any inherited fill from:
- Master slide
- Slide theme
- Parent group shape
Common Scenarios
When to Use No Fill
| Scenario | Reason |
|---|---|
| Outlined text boxes | Show only text + border, not background |
| Wireframe/sketch mode | Transparent shapes for diagramming |
| Overlay/container shapes | Let background content show through |
| Icons with borders | Minimize visual weight |
| Flowchart connectors | Focus on line, not fill |
| Diagram backgrounds | Transparent group containers |
Fill Strategy
Before using a:noFill, consider:
- Is outline (\:ln) present? (otherwise shape may be invisible)
- Is text present? (ensures readability without background)
- Are you overriding inherited fill? (noFill takes precedence)
- Will transparency work on target medium? (e.g., PowerPoint vs. web)
Notes
Element Characteristics
- Empty element: No child elements, no content
- Mutually exclusive: Cannot combine with other fill types (\:solidFill\, \:gradFill\, etc.)
- Override behavior: Explicitly cancels inherited fill from master/theme
- Outline dependent: Most useful when outline (\:ln) is present
- Text compatible: Allows text to be visible without background fill
Rendering
- Word: Shows shape outline only; no fill color
- PowerPoint: Transparent; background visible through shape
- Excel: Transparent cell fill; shows cell background
- Publisher: Transparent; used for overlay shapes
Best Practices
- Always pair with \:ln\ (outline) to make shape visible
- Useful for creating container shapes that group other content
- Prefer explicit \:noFill\ over omitting fill element (more explicit)
- Use for accessibility — transparent shapes don’t obscure content
- Common in flowcharts, diagrams, and wireframe designs
Performance
- No additional rendering overhead
- Minimal file size impact (empty element)
- Fast rendering — no fill calculations needed
Compatibility
- Supported in Office 2007 and later
- Consistent rendering across applications
- No special handling required for older clients