Disable Undo & Redo in Raddiagram

2 posts, 0 answers
  1. deepak
    deepak avatar
    6 posts
    Member since:
    Oct 2011

    Posted 17 Aug Link to this post

    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

  2. Dinko
    Admin
    Dinko avatar
    414 posts

    Posted 21 Aug Link to this post

    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 allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top