Free Support Forum - aspose.com

How to remove shape's outline of the slide

Hi,

Is there any way to remove the outline of the shape.

I have tried with

IAutoShape autoshape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 100, 150, 550, 50);
autoshape.LineFormat.Width = 0;
autoshape.LineFormat.FillFormat.SolidFillColor.Color = Color.Transparent;

But it is not working.

Then tried with

Rectangle rect = sld.Shapes.AddRectangle(432, 384, 4896, 720);
rect.LineFormat.ShowLines = false;

But here I am not able to get “Rectangle” under IAutoShape.

Please help.

Thanks

@sayakg,

I have observed your comments. Can you please try to use LineStyle on your end. I have also shared code snippet. This will help you to achieve your requirements. Please share feedback with us if there is still an issue.

Best Regards,

Adnan Ahmad
LineStyle.zip (212 Bytes)

Hello Adnan,

The zip file is not accessible. Could you please help.

Thanks.

@sayakg,

Please try to use below sample code on your end to achieve requirements.

autoshape.getLineFormat().setStyle(LineStyle.NotDefined);

Please share feedback with us if there is still an issue.

Best Regards,

Adnan Ahmad

Hi Adnan,

I have written in c# as below

IAutoShape autoshape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 100, 150, 550, 50);

            autoshape.FillFormat.FillType = FillType.NoFill;
            autoshape.LineFormat.Width = 0;
            //autoshape.LineFormat.FillFormat.SolidFillColor.Color = Color.Transparent;
            autoshape.LineFormat.Style = LineStyle.NotDefined;

but no luck. I can still see the rectangle shape in border.

Appreciate your advice.

Thanks.

Hi,

I have got it. It should be

autoshape.LineFormat.FillFormat.FillType = FillType.NoFill;

It gets fixed.

Thanks

@sayakg,

Its good to know things are fixed on your end. Please share if we may help you further in this regard.

Many Thanks,

Mudassir Fayyaz