Hi,
I have never tried to create a slide from scratch. Instead, my approach is to create a one-slide presentation with the slide as I desire it, and then integrate the slide using PresentationBuilder, and then if necessary modify the slide after PresentationBuilder is done with it.
When you create a part, it is initially empty, but you can get the XDocument, then modify it. Following is the code to create a new comments part, and the initialize the XDocument.
mainPart.AddNewPart<WordprocessingCommentsPart>();
newComments = mainPart.WordprocessingCommentsPart.GetXDocument();
newComments.Declaration.Standalone = "yes";
newComments.Declaration.Encoding = “UTF-8”;
newComments.Add(new XElement(W.comments, NamespaceAttributes));
commentNumber = 1;
-Eric