This is a migrated thread and some comments may be shown as answers.

RadFlowDocumentEditor how to change weight

6 Answers 519 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
Miriam
Top achievements
Rank 1
Miriam asked on 23 Mar 2017, 10:36 PM

Hi, I wonder if you can help with my issue

How do you change the weight,  when writing a Microsoft Word document using RadFlowDocumentEditor?

I have a problem when I try to put a bold text, because I get the next error: The name 'FontWeights' does not exist in the current context

The code I'm using is:

 RadFlowDocument document = new RadFlowDocument();
 RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);

editor.InsertLine("PASO 3: Detección de riesgos para el nacimiento").FontWeight =  FontWeights.Bold;  

 

6 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 28 Mar 2017, 08:55 AM
Hi Miriam,

The FontWeights enumeration is declared in the System.Windows namespace and to use it, you should add a reference to the PresentationCore.dll assembly in your project.

Hope this helps.

Regards,
Tanya
Telerik by Progress

0
Miriam
Top achievements
Rank 1
answered on 31 Mar 2017, 04:08 PM

Thank you It was very useful.

I have another question

Is it possible to put bold and underline text at the same time? As shown in the picture

And how could I do it?

 

 

 

 

It is possible to put text in bold and underlined at the same time
It is possible to put text in bold and underlined at the same time
Is it possible to put bold and underlined text at the same time?
Is it possible to put bold and underlined text at the same time?
Is it possible to put bold and underlined text at the same time?
0
Accepted
Tanya
Telerik team
answered on 04 Apr 2017, 02:34 PM
Hi Miriam,

Yes, it si possible using the properties of the Run element. Here is an example:
Run run = editor.InsertLine("PASO 3: Detección de riesgos para el nacimiento");
run.FontWeight = FontWeights.Bold;
run.Underline.Pattern = UnderlinePattern.Single;
run.Underline.Color = new ThemableColor(Colors.Black);

Hope this is helpful.

Regards,
Tanya
Telerik by Progress

0
Miriam
Top achievements
Rank 1
answered on 04 Apr 2017, 06:59 PM

Thank you It was very useful

 

0
Nimesh
Top achievements
Rank 1
answered on 16 Mar 2020, 08:13 PM
I'm not able to find this dll in my package. where do i get this from? I have ASP.Net AJAx package downloaded.
0
Tanya
Telerik team
answered on 17 Mar 2020, 09:40 AM

Hello Nimesh,

The binaries related to Telerik Document Processing can be found in the AdditionalLibraries folder of your local installation. Please, check the Included Assemblies help topic for a list with the binaries included in UI for ASP.NET AJAX and their location.

Regards,
Tanya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
WordsProcessing
Asked by
Miriam
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Miriam
Top achievements
Rank 1
Nimesh
Top achievements
Rank 1
Share this question
or