Completed
Last Updated: 14 Feb 2017 09:06 by ADMIN
ADMIN
Hristo
Created on: 26 Jan 2017 09:26
Category: RichTextEditor
Type: Bug Report
1
FIX. RadRichTextEditor - disable the header and footer buttons in the insert tab of the Ribbon UI while editing the header and the footer
How to reproduce: check the attached video

Workaround: 
public partial class Form1 : Form
{
    private RadButtonElement buttonHeader;
    private RadButtonElement buttonFooter; 

    public Form1()
    {
        InitializeComponent();

        this.buttonHeader = (RadButtonElement)this.richTextEditorRibbonBar1.GetType().GetField("buttonHeader", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.richTextEditorRibbonBar1);
        this.buttonFooter = (RadButtonElement)this.richTextEditorRibbonBar1.GetType().GetField("buttonFooter", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.richTextEditorRibbonBar1);
        
        this.radRichTextEditor1.RichTextBoxElement.IsInHeaderFooterEditModeChanged += RichTextBoxElement_IsInHeaderFooterEditModeChanged;
    }
    
    private void RichTextBoxElement_IsInHeaderFooterEditModeChanged(object sender, EventArgs e)
    {
        if (!this.radRichTextEditor1.RichTextBoxElement.IsInHeaderFooterEditMode)
        {
            this.buttonHeader.Enabled = true;
            this.buttonFooter.Enabled = true;
        }
        else
        {
            this.buttonHeader.Enabled = false;
            this.buttonFooter.Enabled = false;
        }
    }
}

Attached Files:
0 comments