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

Set Default Style for Header and Footer

1 Answer 136 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Anand
Top achievements
Rank 1
Anand asked on 16 Jul 2015, 10:36 AM

 Hi, 

I am trying to set Default style for the RadDocument Header and Footer, could you guys help me in this please ? I would like to set them on loading the document and creating the Raddocument instance.

 We set the MainDocuments default style in xaml and load the xaml using XamlFormatProvider.Import(xaml) to create default document. would be great if we can configure style for the Header and footer in xamlas well.

If configuring in xaml is not possible, please suggest some other approach to achieve this

Thanks

Anand

1 Answer, 1 is accepted

Sort by
0
Mihail
Telerik team
answered on 21 Jul 2015, 08:34 AM
Hello Anand,

The default styling for header & footer can't be different from the default styling for the main document.

If your goal is to set default styling, which should be applied over the main document, the header and the footer, then the correct way to do this is to apply the styling over the main document style. Here is example on how to do it:
public MainDemoControl()
{
    InitializeComponent();
 
    this.radRichTextBox.Document.Style.SpanProperties.FontSize = Unit.PointToDip(26);
    this.radRichTextBox.Document.Style.SpanProperties.ForeColor = Colors.Red;
}

If you would like to know more about the styles in RadRichTextBox I can recommend you the styles help article.


Regards,
Mihail
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Anand
Top achievements
Rank 1
Answers by
Mihail
Telerik team
Share this question
or