static void buttonCustomAction_ItemClick_Commands(object sender, ItemClickEventArgs e)
        {
            RichEditControl richEdit = e.Item.Tag as RichEditControl;

            richEdit.SelectAll();

            RichEditCommand capCommand = richEdit.CreateCommand(RichEditCommandId.CapitalizeEachWordTextCase);

            capCommand.ForceExecute(capCommand.CreateDefaultCommandUIState());

            RichEditCommand boldCommand = richEdit.CreateCommand(RichEditCommandId.ToggleFontBold);

            boldCommand.ForceExecute(boldCommand.CreateDefaultCommandUIState());

            RichEditCommand changeFontColorCommand = richEdit.CreateCommand(RichEditCommandId.ChangeFontBackColor);

            DevExpress.Utils.Commands.ICommandUIState state = changeFontColorCommand.CreateDefaultCommandUIState();
            state.EditValue = Color.Yellow;
            changeFontColorCommand.ForceExecute(state);

            RichEditCommand previewCommand = richEdit.CreateCommand(RichEditCommandId.PrintPreview);

            previewCommand.ForceExecute(previewCommand.CreateDefaultCommandUIState());

            richEdit.DeselectAll();
        }
        private void QuoteButton_Click(object sender, EventArgs e) //quoute
        {
            DocumentRange       range = MainRichTextBox.Document.Selection;
            CharacterProperties crp   = MainRichTextBox.Document.BeginUpdateCharacters(range);

            crp.FontName  = crp.FontName;
            crp.FontSize  = 12;
            crp.ForeColor = Color.Black;

            if (crp.Italic == false)
            {
                crp.Italic = true;
            }

            RichEditCommand paragraphAlignmentCenter = MainRichTextBox.CreateCommand(RichEditCommandId.ToggleParagraphAlignmentCenter);

            paragraphAlignmentCenter.ForceExecute(paragraphAlignmentCenter.CreateDefaultCommandUIState());

            MainRichTextBox.Document.EndUpdateCharacters(crp);
        }
        private void Justify_Click(object sender, EventArgs e) //allign justify
        {
            RichEditCommand paragraphAlignmentJustify = MainRichTextBox.CreateCommand(RichEditCommandId.ToggleParagraphAlignmentJustify);

            paragraphAlignmentJustify.ForceExecute(paragraphAlignmentJustify.CreateDefaultCommandUIState());
        }
        private void MiddleAlign_Click(object sender, EventArgs e) //middle allign
        {
            RichEditCommand paragraphAlignmentCenter = MainRichTextBox.CreateCommand(RichEditCommandId.ToggleParagraphAlignmentCenter);

            paragraphAlignmentCenter.ForceExecute(paragraphAlignmentCenter.CreateDefaultCommandUIState());
        }
        private void RightAlign_Click(object sender, EventArgs e) //right allign
        {
            RichEditCommand paragraphAlignmentRight = MainRichTextBox.CreateCommand(RichEditCommandId.ToggleParagraphAlignmentRight);

            paragraphAlignmentRight.ForceExecute(paragraphAlignmentRight.CreateDefaultCommandUIState());
        }
        private void button16_Click_1(object sender, EventArgs e)//left indendetation scaling
        {
            RichEditCommand decreaseIndent = MainRichTextBox.CreateCommand(RichEditCommandId.DecreaseIndent);

            decreaseIndent.ForceExecute(decreaseIndent.CreateDefaultCommandUIState());
        }
        private void button15_Click_1(object sender, EventArgs e)//right indendetation scaling
        {
            RichEditCommand increaseIndent = MainRichTextBox.CreateCommand(RichEditCommandId.IncreaseIndent);

            increaseIndent.ForceExecute(increaseIndent.CreateDefaultCommandUIState());
        }
        private void Number_Click(object sender, EventArgs e)//number list
        {
            RichEditCommand numberlist = MainRichTextBox.CreateCommand(RichEditCommandId.ToggleNumberingListItem);

            numberlist.ForceExecute(numberlist.CreateDefaultCommandUIState());
        }
        private void Bullet_Click(object sender, EventArgs e) // bulleting numbers
        {
            RichEditCommand bulletCommand = MainRichTextBox.CreateCommand(RichEditCommandId.ToggleBulletedListItem);

            bulletCommand.ForceExecute(bulletCommand.CreateDefaultCommandUIState());
        }
        private void button1_Click(object sender, EventArgs e)
        {
            RichEditCommand bulletedlist = MainRichTextBox.CreateCommand(RichEditCommandId.None);

            bulletedlist.ForceExecute(bulletedlist.CreateDefaultCommandUIState());
        }