Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Issue to code

Hi,
It is not having "Underline" effect to the words below. What to adjust? 

              RunProperties runProperties2 = run.AppendChild(new RunProperties(new RunFonts { Ascii = "Times New Roman" }));
              RunProperties runProperties3 = run.AppendChild(new RunProperties(new FontSize { Val = new StringValue("24") }));               RunProperties runProperties = run.AppendChild(new RunProperties(new Underline()));               run.AppendChild(new Text("Personal Details"));

Open in new window

Avatar of louisfr
louisfr

You didn't set the Val property of the Underline object.
Avatar of Peter Chan

ASKER

Can you share more details to the change? 
ASKER CERTIFIED SOLUTION
Avatar of louisfr
louisfr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It is fine to Underline effect and why is it not fine to Bold like the following?

RunProperties runProperties = run.AppendChild(new RunProperties(new Bold { Val = BoldValues.Single }));

Open in new window

Hi,
Can you help?
Bold is a On/Off property. You can use new Bold { Val = true }, or just new Bold() because true is the default.