Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.
Mon Jan 06, 2020 7:32 pm
Hello all, I'm trying to figure out how to make the Presentation component show a purple band across the entire width of the slide. The background (highlight) only goes as far as the text shows. Any attempt to use or ALT-255 to build in spaces does not work. Thank you.
Dan Brewerton, MIS
Cybersecurity Specialist
.NET Programmer
-
dbrewerton
-
- Posts: 12
- Joined: Thu Nov 14, 2019 4:07 pm
- Location: Honeoye, NY, USA
Tue Jan 07, 2020 1:38 am
Hi,
Thanks for your inquiry.
Sorry that I am not quite clear about your requirement. Could you please provide the excepted PPT file(you could create it by MS PowerPoint) for further investigation?
Sincerely,
Betsy
E-iceblue support team
-
Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Tue Jan 07, 2020 1:41 pm
Ok, here is an example showing what I want and what I'm getting.
Login to view the files attached to this post.
Dan Brewerton, MIS
Cybersecurity Specialist
.NET Programmer
-
dbrewerton
-
- Posts: 12
- Joined: Thu Nov 14, 2019 4:07 pm
- Location: Honeoye, NY, USA
Wed Jan 08, 2020 4:00 am
Hi,
Thanks for your information.
I created a file according to your example PPT file. Please refer to below code:
- Code: Select all
Presentation presentation = new Presentation();
presentation.SlideSize.Size = new SizeF(960, 540);
ISlide slide = presentation.Slides[0];
var shape = slide.Shapes.AppendShape(ShapeType.Rectangle, new RectangleF(20.57f, 181.1f, 333.25f, 32.91f));
shape.Fill.FillType = FillFormatType.Solid;
shape.Fill.SolidColor.Color = Color.Purple;
shape.Line.FillType = FillFormatType.None;
shape = slide.Shapes.AppendShape(ShapeType.Rectangle, new RectangleF(20.57f, 82.28f, 917.48f, 32.91f));
shape.Fill.FillType = FillFormatType.Solid;
shape.Fill.SolidColor.Color = Color.Purple;
shape.Line.FillType = FillFormatType.None;
presentation.SaveToFile("20114.pptx", FileFormat.Pptx2010);
Attached is my result.
Sincerely,
Betsy
E-iceblue support team
Login to view the files attached to this post.
-
Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Wed Jan 08, 2020 1:30 pm
That worked beautifully.
Dan Brewerton, MIS
Cybersecurity Specialist
.NET Programmer
-
dbrewerton
-
- Posts: 12
- Joined: Thu Nov 14, 2019 4:07 pm
- Location: Honeoye, NY, USA
Thu Jan 09, 2020 1:37 am
Hi,
Thanks for your feedback.
Any question, please feel free to contact us.
Sincerely,
Betsy
E-iceblue support team
-
Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am