We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Slide number in footer is visible despite turning off (C# .NET)

Hi Aspose. I’m facing an issue while trying to set SlideNumberVisibility for master slides and layouts, they are still visible in child slides. Could you please advise? Here is the source code. The source deck and the result deck are included in the source code.

@obrusentsov,

I have tried understanding your requirement and have not been able to completely understand what output you are interested in getting out on your end. On Master slide, there are two shapes:
1: A placeholder with SlideNumber type
2: An Autoshape in which text frame portion has a field type of SlideNium.

Please note that when you set or reset the HeaderFooter properties, they will not be applied to 2nd one and you will have to manually access the shape and remove or hide that as per your requirements.

var type= ((Aspose.Slides.Field)((IAutoShape)master.Shapes[1]).TextFrame.Paragraphs[0].Portions[0].Field).Type;

I hope the shared elaboration will be helpful.

The situation is that there is a slide number inside the master slide or the layout slide and i’m trying to move it to the slide itself. To do that i’m trying to make slide number inslide the master slide invisible, then copy all of its parameters and create a slide number inside the child slide. I have a workaround but it would be better to use documented features instead.

@obrusentsov,

I have observed the comments shared by you and like to share that this is not an issue with API. Ideally, if you want to add a shape that you want to appear on all slides, you have to add that on Master slide. Likewise, if you want to add the shape that you want to appear on particular layout type slides and not all then you add that shape on that particular layout that slide will inherit. Lastly, if you want to add a shape that you only want to appear on any given slide then you will add that on that particular slide. I hope this will clarify the concept.