@@ -17,12 +17,6 @@ static void Main(string[] args)
1717 // Appends a hyperlink to the last paragraph of the document
1818 string linkUri = "https://www.syncfusion.com" ;
1919 IWField field = document . LastParagraph . AppendHyperlink ( linkUri , "Syncfusion" , HyperlinkType . WebLink ) ;
20- // Character format for hyperlink
21- bool isItalic = false ;
22- bool isUnderline = true ;
23- bool isStrikeout = false ;
24- bool isBold = false ;
25- float fontSize = 12 ;
2620 //Format hyperlink
2721 IEntity entity = field ;
2822 //Iterates to sibling items until Field End
@@ -33,12 +27,12 @@ static void Main(string[] args)
3327 WTextRange textRange = entity as WTextRange ;
3428 //Apply character format for text ranges
3529 textRange . CharacterFormat . FontName = "Verdana" ;
36- textRange . CharacterFormat . FontSize = fontSize ;
30+ textRange . CharacterFormat . FontSize = 12 ;
3731 textRange . CharacterFormat . TextColor = Color . Red ;
38- textRange . CharacterFormat . Bold = isBold ;
39- textRange . CharacterFormat . Italic = isItalic ;
40- textRange . CharacterFormat . UnderlineStyle = isUnderline ? UnderlineStyle . Single : UnderlineStyle . None ;
41- textRange . CharacterFormat . Strikeout = isStrikeout ;
32+ textRange . CharacterFormat . Bold = false ;
33+ textRange . CharacterFormat . Italic = false ;
34+ textRange . CharacterFormat . UnderlineStyle = UnderlineStyle . Single ;
35+ textRange . CharacterFormat . Strikeout = false ;
4236 }
4337 else if ( ( entity is WFieldMark ) && ( entity as WFieldMark ) . Type == FieldMarkType . FieldEnd )
4438 break ;
0 commit comments