Skip to main content
Mar 17, 2009 3:47 AM UTC
Answered

how to get fontSize of a para

para.fontSize is write-only, what is the easy way to get fontSize applied on certain FlowElement ?

Thanks
This topic is closed to new replies. Start a new post to keep the conversation going.
rdermerCorrect answer
Inspiring
Mar 17, 2009 4:41 AM UTC
Assuming build 370 or greater:

para.textLayoutFormat.fontSize returns the fontSize (if any) set on the para element.
Note that para.textLayoutFormat may be null.

para.computedTextLayoutFormat.fontSize returns the result of computing the format applying inheritance rules - if its not set on para then it has the parent's value.

1 reply

rdermerCorrect answer
Inspiring
Mar 17, 2009 4:41 AM UTC
Assuming build 370 or greater:

para.textLayoutFormat.fontSize returns the fontSize (if any) set on the para element.
Note that para.textLayoutFormat may be null.

para.computedTextLayoutFormat.fontSize returns the result of computing the format applying inheritance rules - if its not set on para then it has the parent's value.
Translate