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

Change Table Border Color

1 Answer 220 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Jan Paolo
Top achievements
Rank 1
Jan Paolo asked on 15 May 2019, 07:35 PM

Hello, Is there a way to change the table border color in a RichTextBox?

1. Default : When user creates table, it should have a pre-defined color (in our case, gray)

2. User runtime : User should have the ability to change the table border color if they want to.

Thank you,

Jan

 

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 20 May 2019, 09:52 AM
Hello Jan,

You can change the default appearance of the inserted tables through the Table Normal style which is applied to the newly added objects:
StyleDefinition style = this.radRichTextBox.Document.StyleRepository["TableNormal"];
style.TableProperties.Borders = new TableBorders(new Telerik.Windows.Documents.Model.Border(BorderStyle.Single, System.Windows.Media.Colors.Red));
style.TableCellProperties.Borders = new TableCellBorders(new Telerik.Windows.Documents.Model.Border(BorderStyle.Single, System.Windows.Media.Colors.Red));

More information on the topic you can find in the Styles help article.

Hope this is helpful.

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
RichTextBox
Asked by
Jan Paolo
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or