TextStyle.IsHyperlink
محتويات
[
يخفي
]TextStyle.IsHyperlink property
مهجور منذ الإصدار 22.5. استخدم HyperlinkAddress بدلاً من ذلك.
public bool IsHyperlink { get; set; }
أمثلة
يظهر كيفية ربط ارتباط تشعبي بنص.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_Tasks();
// إنشاء كائن من فئة Document
Document doc = new Document();
RichText titleText = new RichText() { ParagraphStyle = ParagraphStyle.Default }.Append("Title!");
Outline outline = new Outline()
{
MaxWidth = 200,
MaxHeight = 200,
VerticalOffset = 100,
HorizontalOffset = 100
};
TextStyle textStyleRed = new TextStyle
{
FontColor = Color.Red,
FontName = "Arial",
FontSize = 10,
};
TextStyle textStyleHyperlink = new TextStyle
{
HyperlinkAddress = "https://www.google.com"
};
RichText text = new RichText() { ParagraphStyle = ParagraphStyle.Default }
.Append("This is ", textStyleRed)
.Append("hyperlink", textStyleHyperlink)
.Append(". This text is not a hyperlink.", TextStyle.Default);
OutlineElement outlineElem = new OutlineElement();
outlineElem.AppendChildLast(text);
// إضافة عناصر المخطط
outline.AppendChildLast(outlineElem);
// تهيئة كائن فئة Title
Title title = new Title() { TitleText = titleText };
// تهيئة كائن فئة Page
Page page = new Note.Page() { Title = title };
// إضافة عقدة المخطط
page.AppendChildLast(outline);
// إضافة عقدة الصفحة
doc.AppendChildLast(page);
// حفظ مستند OneNote.
dataDir = dataDir + "AddHyperlink_out.one";
doc.Save(dataDir);
انظر أيضًا
- class TextStyle
- namespace Aspose.Note
- assembly Aspose.Note