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

Disable Undo & Redo in Raddiagram

1 Answer 196 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
deepak
Top achievements
Rank 1
deepak asked on 17 Aug 2017, 08:00 AM

Hi,

In RadDiagram i am able to disable copy ,cut and paste using AllowCopy="False" AllowCut="False" AllowPaste="False" .

How do i disable undo(Ctrl+Z) & redo( Ctrl+Y) functionality ?

Thanks

Deepak Deshmukh

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 21 Aug 2017, 01:13 PM
Hello,

In order to disable the undo/redo functionality when the Ctrl+Z/Y is pressed you can override the input bindings for those commands. Here is an example:
public MainWindow()
{
    InitializeComponent();
    CommandManager.RegisterClassInputBinding(typeof(RadDiagram), new InputBinding(ApplicationCommands.NotACommand, new KeyGesture(Key.Z, ModifierKeys.Control)));
    CommandManager.RegisterClassInputBinding(typeof(RadDiagram), new InputBinding(ApplicationCommands.NotACommand, new KeyGesture(Key.Y, ModifierKeys.Control)));
}

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Diagram
Asked by
deepak
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or