IsLinkToContent
DocumentProperty.IsLinkToContent property
يوضح ما إذا كانت هذه الخاصية مرتبطة بالمحتوى أم لا.
public bool IsLinkToContent { get; }
أمثلة
يوضح كيفية ربط خاصية مستند مخصص بإشارة مرجعية.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.StartBookmark("MyBookmark");
builder.Write("Hello world!");
builder.EndBookmark("MyBookmark");
// ربط خاصية مخصصة جديدة بإشارة مرجعية. قيمة هذا العقار
// ستكون محتويات الإشارة المرجعية التي تشير إليها في العضو "LinkSource".
CustomDocumentProperties customProperties = doc.CustomDocumentProperties;
DocumentProperty customProperty = customProperties.AddLinkToContent("Bookmark", "MyBookmark");
Assert.AreEqual(true, customProperty.IsLinkToContent);
Assert.AreEqual("MyBookmark", customProperty.LinkSource);
Assert.AreEqual("Hello world!", customProperty.Value);
doc.Save(ArtifactsDir + "DocumentProperties.LinkCustomDocumentPropertiesToBookmark.docx");
أنظر أيضا
- class DocumentProperty
- مساحة الاسم Aspose.Words.Properties
- المجسم Aspose.Words