UnderlineType Enumeration |
Represents type of the underline applied to a text.
Namespace: SautinSoft.DocumentAssembly: SautinSoft.Document (in SautinSoft.Document.dll) Version: 2025.2.13
Syntaxpublic enum UnderlineType
Public Enumeration UnderlineType
MembersMember name | Value | Description |
---|
None | 0 |
Specifies no underline.
|
Single | 1 |
Specifies an underline consisting of a single line.
|
Double | 2 |
Specifies an underline consisting of two lines.
|
Dotted | 3 |
Specifies an underline consisting of a series of dots.
|
Dashed | 4 |
Specifies an underline consisting of a dashed line.
|
DotDash | 5 |
Specifies an underline consisting of a series of dot - dash.
|
DotDotDash | 6 |
Specifies an underline consisting of a series of dot - dot - dash.
|
Wave | 7 |
Specifies an underline consisting of a single wavy line.
|
DoubleWave | 8 |
Specifies an underline consisting of a pair of wavy lines.
|
UnderlineNonSpaceCharactersOnly | 9 |
Specifies an underline consisting of a single line beneath all non-space characters in the text.
|
ExampleSee Developer Guide: Insert a hyperlink into a document
How to insert a hyperlink into a document using C#
using System;
using SautinSoft.Document;
using System.Text;
using SautinSoft.Document.Drawing;
namespace Example
{
class Program
{
static void Main(string[] args)
{
InsertingHyperlink();
}
static void InsertingHyperlink()
{
DocumentCore dc = new DocumentCore();
DocumentBuilder db = new DocumentBuilder(dc);
db.CharacterFormat.FontName = "Verdana";
db.CharacterFormat.Size = 16;
db.Writeln("Insert a hyperlink into a document using DocumentBuilder.");
db.CharacterFormat.Size = 26;
db.CharacterFormat.FontColor = Color.Brown;
db.InsertField("DATE");
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.CharacterFormat.FontColor = Color.Blue;
db.CharacterFormat.UnderlineStyle = UnderlineType.Dashed;
db.InsertHyperlink("Welcome to SautinSoft!", "https://sautinsoft.com", false);
db.InsertSpecialCharacter(SpecialCharacterType.PageBreak);
db.CharacterFormat.FontColor = Color.Brown;
db.CharacterFormat.UnderlineStyle = UnderlineType.DotDotDash;
db.InsertHyperlink("back to the field {DATE}", "DATE", true);
string resultPath = @"Result.docx";
dc.Save(resultPath, new DocxSaveOptions());
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(resultPath) { UseShellExecute = true });
}
}
}
How to insert a hyperlink into a document using VB.Net
Imports System
Imports SautinSoft.Document
Imports System.Text
Imports SautinSoft.Document.Drawing
Namespace Example
Friend Class Program
Shared Sub Main(ByVal args() As String)
InsertingHyperlink()
End Sub
Private Shared Sub InsertingHyperlink()
Dim dc As New DocumentCore()
Dim db As New DocumentBuilder(dc)
Dim resultPath As String = "result.docx"
db.CharacterFormat.FontName = "Verdana"
db.CharacterFormat.Size = 16
db.Writeln("Insert a hyperlink into a document using DocumentBuilder.")
db.CharacterFormat.Size = 26
db.CharacterFormat.FontColor = Color.Brown
db.InsertField("DATE")
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.CharacterFormat.FontColor = Color.Blue
db.CharacterFormat.UnderlineStyle = UnderlineType.Dashed
db.InsertHyperlink("Welcome to SautinSoft!", "https://sautinsoft.com", False)
db.InsertSpecialCharacter(SpecialCharacterType.PageBreak)
db.CharacterFormat.FontColor = Color.Brown
db.CharacterFormat.UnderlineStyle = UnderlineType.DotDotDash
db.InsertHyperlink("back to the field {DATE}", "DATE", True)
dc.Save(resultPath, New DocxSaveOptions())
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(resultPath) With {.UseShellExecute = True})
End Sub
End Class
End Namespace
See Also