Interface IPlaceholderFormat
Represents the placeholder formatting options.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.NET.dll
Syntax
public interface IPlaceholderFormat
Properties
Name
Gets or sets the name of the place holder.
Declaration
string Name { get; set; }
Property Value
Type |
---|
System.String |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Title);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance for place holder format
IPlaceholderFormat placeholder = (slide.Shapes[0] as IShape).PlaceholderFormat;
//Set the name of the place holder format
placeholder.Name = "Place holder format";
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Title)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance for place holder format
Dim placeholder As IPlaceholderFormat = TryCast(slide.Shapes(0), IShape).PlaceholderFormat
'Set the name of the place holder format
placeholder.Name = "Place holder format"
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Type
Gets the PlaceholderType type. Read-only.
Declaration
PlaceholderType Type { get; }
Property Value
Type |
---|
PlaceholderType |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Title);
//Add a rectangle to the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
//Create instance for place holder format
IPlaceholderFormat placeholder = (slide.Shapes[0] as IShape).PlaceholderFormat;
//Get the type of place holder format, read only
PlaceholderType type = placeholder.Type;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation.
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Title)
'Add a rectangle to the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
'Create instance for place holder format
Dim placeholder As IPlaceholderFormat = TryCast(slide.Shapes(0), IShape).PlaceholderFormat
'Get the type of place holder format, read only
Dim type As PlaceholderType = placeholder.Type
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()