Interface ISolidFill
Represents the solid type fill formatting.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface ISolidFill
Properties
Color
Gets or sets the color for the solid fill.
Declaration
IColor Color { get; set; }
Property Value
Type | Description |
---|---|
IColor | The color of the solid fill. |
Remarks
Uses 'ColorObject' type to apply the color.
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Create instance for slide background
IBackground background = slide.Background;
//Set the fill type for background as Solid fill
background.Fill.FillType = FillType.Solid;
//Create instance for solid Fill
ISolidFill solidFill = background.Fill.SolidFill;
//Set the color for solid fill object
solidFill.Color = ColorObject.FromArgb(120, 234, 67, 89);
//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 slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Create instance for slide background
Dim background As IBackground = slide.Background
'Set the fill type for background as Solid fill
background.Fill.FillType = FillType.Solid
'Create instance for solid Fill
Dim solidFill As ISolidFill = background.Fill.SolidFill
'Set the color for solid fill object
solidFill.Color = ColorObject.FromArgb(120, 234, 67, 89)
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Transparency
Gets or sets the transparency in percentage. Ranges from 1 to 100.
Declaration
int Transparency { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Create instance for slide background
IBackground background = slide.Background;
//Set the fill type for background as Solid fill
background.Fill.FillType = FillType.Solid;
//Create instance for solid Fill
ISolidFill solidFill = background.Fill.SolidFill;
//Set the color for solid fill object
solidFill.Color = ColorObject.FromArgb(120, 234, 67, 89);
//Set the color transparency
solidFill.Transparency = 30;
//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 slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Create instance for slide background
Dim background As IBackground = slide.Background
'Set the fill type for background as Solid fill
background.Fill.FillType = FillType.Solid
'Create instance for solid Fill
Dim solidFill As ISolidFill = background.Fill.SolidFill
'Set the color for solid fill object
solidFill.Color = ColorObject.FromArgb(120, 234, 67, 89)
'Set the color transparency
solidFill.Transparency = 30
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()