Interface IGradientFill
Represents the gradient type fill format.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.NET.dll
Syntax
public interface IGradientFill
Properties
GradientStops
Gets the gradient stop collection. Read-only.
Declaration
IGradientStops GradientStops { get; }
Property Value
Type |
---|
IGradientStops |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
slide.Background.Fill.FillType = FillType.Gradient;
//Retrieve the gradient fill from the shape
IGradientFill gradientFill = slide.Background.Fill.GradientFill;
//Add a gradient stop.
gradientFill.GradientStops.Add();
//Retrieve gradient stops, it is read only
IGradientStops stops = gradientFill.GradientStops;
//Add gradient stop with color
stops.Add().Color = ColorObject.FromArgb(13, 34, 89, 32);
//Add gradient stop with position
stops.Add().Position = 3.5F;
//Save the presentation
presentation.Save("Output.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)
slide.Background.Fill.FillType = FillType.Gradient
'Retrieve the gradient fill from the shape
Dim gradientFill As IGradientFill = slide.Background.Fill.GradientFill
'Add a gradient stop.
gradientFill.GradientStops.Add()
'Retrieve gradient stops, it is read only
Dim stops As IGradientStops = gradientFill.GradientStops
'Add gradient stop with color
stops.Add().Color = ColorObject.FromArgb(13, 34, 89, 32)
'Add gradient stop with position
stops.Add().Position = 3.5F
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()