internal static void RaiseDocumentPartHide(DocumentPart sender, DocumentPartEventArgs e)
            {
                EventHandler <DocumentPartEventArgs> handler = DocumentPartHide;

                if (handler != null)
                {
                    handler(sender, e);
                }
            }
        public DocumentPart CreateDocumentPart(PackageRelationship relationship)
        {
            DocumentPart documentPart = null;

            if (relationship.TargetMode == TargetMode.Internal)
            {
                if (IsPackageType(relationship.RelationshipType))
                {
                    documentPart = new PackageDocumentPart(_owner, relationship);
                }
                else
                {
                    documentPart = new InternalDocumentPart(_owner, relationship);
                }
            }
            else
            {
                documentPart = new ExternalDocumentPart(_owner, relationship);
            }
            return(documentPart);
        }