## Section::DeleteHeaderFooterShapes method


Deletes all shapes (drawing objects) from the headers and footers of this section.

```cpp
void Aspose::Words::Section::DeleteHeaderFooterShapes()
```


## Examples



Shows how to remove all shapes from all headers footers in a section. 
```cpp
auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

// Create a primary header with a shape.
builder->MoveToHeaderFooter(HeaderFooterType::HeaderPrimary);
builder->InsertShape(ShapeType::Rectangle, static_cast<double>(100), static_cast<double>(100));

// Create a primary footer with an image.
builder->MoveToHeaderFooter(HeaderFooterType::FooterPrimary);
builder->InsertImage(get_ImageDir() + u"Logo icon.ico");

ASSERT_EQ(1, doc->get_FirstSection()->get_HeadersFooters()->idx_get(HeaderFooterType::HeaderPrimary)->GetChildNodes(NodeType::Shape, true)->get_Count());
ASSERT_EQ(1, doc->get_FirstSection()->get_HeadersFooters()->idx_get(HeaderFooterType::FooterPrimary)->GetChildNodes(NodeType::Shape, true)->get_Count());

// Remove all shapes from the headers and footers in the first section.
doc->get_FirstSection()->DeleteHeaderFooterShapes();

ASSERT_EQ(0, doc->get_FirstSection()->get_HeadersFooters()->idx_get(HeaderFooterType::HeaderPrimary)->GetChildNodes(NodeType::Shape, true)->get_Count());
ASSERT_EQ(0, doc->get_FirstSection()->get_HeadersFooters()->idx_get(HeaderFooterType::FooterPrimary)->GetChildNodes(NodeType::Shape, true)->get_Count());
```

## See Also

* Class [Section](../)
* Namespace [Aspose::Words](../../)
* Library [Aspose.Words for C++](../../../)
