Avatar of Peter Chan
Peter Chan
Flag 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

C#Programming Languages-OtherProgramming

Avatar of undefined
Last Comment
louisfr

8/22/2022 - Mon
louisfr

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

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

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Peter Chan

ASKER
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

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Peter Chan

ASKER
Hi,
Can you help?
louisfr

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