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

WPF RadRichTexBox - Disable "Undo" Dropdown

6 Answers 29 Views
This is a migrated thread and some comments may be shown as answers.
Ramalingam
Top achievements
Rank 1
Ramalingam asked on 19 Nov 2014, 07:20 AM
Hi Team,
Could you please help us on below issue :

1) I have typed the word "testing"

2) Deleted "ing" and the current text is "test"

3) When I see the "Undo", It shows all the operations, like shown in the attachment "Undo - Dropdown.png"

4) Please suggest us the way to disable this "Undo" Dropdown, We like to shown only the "Undo" button (without dropdown)

Thanks,
Obuliraj Ramalingam

6 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 20 Nov 2014, 02:55 PM
Hi Ramalingam,

You can set the UndoCommand to a RadRibbonButton instead of the default RadRibbonSplitButton in the RadRichTextBoxRibbonUI as follows:
<telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding UndoCommand}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/undo.png" Text="Undo"/>

In this way you will achieve the desired look and functionality.

I hope this helps.

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ramalingam
Top achievements
Rank 1
answered on 04 Dec 2014, 01:25 PM
Hi Todor,
    Thanks for the suggestion.

Undo - Dropdown is not shown now, However the "down arrow" image (next to Undo image) is still shown.
Please refer to the attachment "Undo dropdown arrow.png"

Could you please suggest a way to hide this "down arrow" image also.

Thanks,
Obuliraj Ramalingam


0
Todor
Telerik team
answered on 08 Dec 2014, 09:16 AM
Hello Ramalingam,

The button which is shown on the image doesn't look like a RadRibbonButton. For your convenience, I've created a sample demo project which illustrates the desired look and behavior for the Undo button.
Please find it attached.

I hope this helps.

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ramalingam
Top achievements
Rank 1
answered on 22 Dec 2014, 09:07 AM
Hi,
Thanks for the sample. I am able to hide the "dropdown" image now.

Could you please suggest a way to set Undo Levels :

For example, User is allowed to Undo of 25 previous operations,
Undo button will be disabled or we need to ignore Undo operation after 25 operations.

Thanks,
Obuliraj Ramalingam
0
Tanya
Telerik team
answered on 22 Dec 2014, 02:58 PM
Hi Obuliraj,

This functionality comes out-of-the-box with the History feature. You should set the Depth property of the RadDocuments' History:
this.radRichTextBox.Document.History.Depth = 25;
By setting this property, you specify how many actions shall be recorded in the RadDocument's history. After the 25th operation the Undo button will be disabled automatically, because there won't be any other recorded actions.

Please, let us know if you have other questions.

Regards,
Tanya
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ramalingam
Top achievements
Rank 1
answered on 24 Dec 2014, 10:26 AM
Hi Tanya,
Thanks for the suggestion. It's working now.

Thanks,
Obuliraj Ramalingam
Asked by
Ramalingam
Top achievements
Rank 1
Answers by
Todor
Telerik team
Ramalingam
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or