Interface IHeadersFooters
Contains all the IHeaderFooter objects on the specified slide, notes slide, or master.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface IHeadersFooters
Properties
DateAndTime
Gets an IHeaderFooter object that represents a DateAndTime item that appears in the lower-left corner of a slide or in the upper-right corner of a notes slide.
Declaration
IHeaderFooter DateAndTime { get; }
Property Value
Type |
---|
IHeaderFooter |
Examples
//Creates an instance of Presentation
IPresentation pptxDoc = Presentation.Create();
//Adds a blank slide.
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Gets the date time header footer of the slide.
IHeaderFooter dateTimeFooter = slide.HeadersFooters.DateAndTime;
//Sets the visibility of Date and Time in the slide
dateTimeFooter.Visible = true;
//Sets the format of the Date and Time to the Footer
dateTimeFooter.Format = DateTimeFormatType.DateTimehmmssAMPM;
//Add an auto shape to slide
slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 250, 250);
//Saves the Presentation to the file system
pptxDoc.Save("Sample.pptx");
//Closes the Presentation
pptxDoc.Close();
'Creates an instance of Presentation
Dim pptxDoc As IPresentation = Presentation.Create()
'Adds a blank slide
Dim slide As ISlide = pptxDoc.Slides.Add(SlideLayoutType.Blank)
'Gets the date time header footer of the slide.
Dim dateTimeFooter As IHeaderFooter = slide.HeadersFooters.DateAndTime
'Sets the visibility of Date and Time in the slide
dateTimeFooter.Visible = True
'Sets the format of the Date and Time to the Footer
dateTimeFooter.Format = DateTimeFormatType.DateTimehmmssAMPM
'Add an auto shape to slide
slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 250, 250)
'Saves the Presentation to the file system
pptxDoc.Save("Sample.pptx")
'Closes the Presentation
pptxDoc.Close()
Footer
Gets an IHeaderFooter object that represents a Footer that appears at the bottom of a slide or in the lower-left corner of a notes slide.
Declaration
IHeaderFooter Footer { get; }
Property Value
Type |
---|
IHeaderFooter |
Examples
//Creates an instance of Presentation
IPresentation pptxDoc = Presentation.Create();
//Adds a blank slide.
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Gets the footer of the slide.
IHeaderFooter footer = slide.HeadersFooters.Footer;
//Sets the visibility of Footer content in the slide
footer.Visible = true;
//Sets the text to be added to the Footer
footer.Text = "Footer content";
//Add an auto shape to slide
slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 250, 250);
//Saves the Presentation to the file system
pptxDoc.Save("Sample.pptx");
//Closes the Presentation
pptxDoc.Close();
'Creates an instance of Presentation
Dim pptxDoc As IPresentation = Presentation.Create()
'Adds a blank slide
Dim slide As ISlide = pptxDoc.Slides.Add(SlideLayoutType.Blank)
'Gets the footer of the slide.
Dim footer As IHeaderFooter = slide.HeadersFooters.Footer
'Sets the visibility of Footer content in the slide
footer.Visible = True
'Sets the text to be added to the Footer
footer.Text = "Footer content"
'Add an auto shape to slide
slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 250, 250)
'Saves the Presentation to the file system
pptxDoc.Save("Sample.pptx")
'Closes the Presentation
pptxDoc.Close()
Header
Gets an IHeaderFooter object that represents a Header that appears at the top-left corner of a notes slide.
Declaration
IHeaderFooter Header { get; }
Property Value
Type |
---|
IHeaderFooter |
Remarks
Header is valid only for Notes slide.
Examples
//Creates an instance of Presentation
IPresentation pptxDoc = Presentation.Create();
//Adds a blank slide.
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Adds new notes slide in the specified slide.
INotesSlide notesSlide = slide.AddNotesSlide();
//Adds text content into the Notes Slide.
notesSlide.NotesTextBody.AddParagraph("Notes content");
//Gets the header of the notes slide.
IHeaderFooter header = notesSlide.HeadersFooters.Header;
//Sets the visibility of header content in the notes slide
header.Visible = true;
//Sets the text to be added to the header
header.Text = "Header content is added";
//Add an auto shape to slide
slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 250, 250);
//Saves the Presentation.
pptxDoc.Save("Sample.pptx");
//Closes the Presentation
pptxDoc.Close();
'Creates an instance of Presentation
Dim pptxDoc As IPresentation = Presentation.Create()
'Adds a blank slide.
Dim slide As ISlide = pptxDoc.Slides.Add(SlideLayoutType.Blank)
'Adds new notes slide in the specified slide.
Dim notesSlide As INotesSlide = slide.AddNotesSlide()
'Adds text content into the Notes Slide.
notesSlide.NotesTextBody.AddParagraph("Notes content")
'Gets the header of the notes slide.
Dim header As IHeaderFooter = notesSlide.HeadersFooters.Header
'Sets the visibility of header content in the notes slide
header.Visible = True
'Sets the text to be added to the header
header.Text = "Header content is added"
'Add an auto shape to slide
slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 250, 250)
'Saves the Presentation.
pptxDoc.Save("Sample.pptx")
'Closes the Presentation
pptxDoc.Close()
SlideNumber
Gets an IHeaderFooter object that represents the SlideNumber in the lower-right corner of a slide, or the page number in the lower-right corner of a notes slide.
Declaration
IHeaderFooter SlideNumber { get; }
Property Value
Type |
---|
IHeaderFooter |
Examples
//Creates an instance of Presentation
IPresentation pptxDoc = Presentation.Create();
//Adds a blank slide.
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Sets the visibility of slide number in the slide
slide.HeadersFooters.SlideNumber.Visible = true;
//Add an auto shape to slide
slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 250, 250);
//Saves the Presentation to the file system
pptxDoc.Save("Sample.pptx");
//Closes the Presentation
pptxDoc.Close();
'Creates an instance of Presentation
Dim pptxDoc As IPresentation = Presentation.Create()
'Adds a blank slide
Dim slide As ISlide = pptxDoc.Slides.Add(SlideLayoutType.Blank)
'Sets the visibility of slide number in the slide
slide.HeadersFooters.SlideNumber.Visible = True
'Add an auto shape to slide
slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 250, 250)
'Saves the Presentation to the file system
pptxDoc.Save("Sample.pptx")
'Closes the Presentation
pptxDoc.Close()