From 0e1b203d1c1fd67ca5f4851cbd8b5a5cd10c388f Mon Sep 17 00:00:00 2001 From: KrithikaGanesan Date: Fri, 24 Oct 2025 15:58:08 +0530 Subject: [PATCH] 985360: Updated ReadMe file of this repository --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1944ca9..2795999 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ -# How-to-modify-or-disable-shortcuts-of-EditControl -This repository contains the sample that how to modify or disable shortcuts of EditControl. +# How to Modify or Disable Shortcuts of EditControl +This repository provides a detailed example of how to modify or disable keyboard shortcuts in the Syncfusion EditControl for WPF applications. The EditControl is a versatile text editor component that supports syntax highlighting, code editing, and customizable features. In certain scenarios, developers may want to override or disable default shortcuts such as Undo (Ctrl+Z) and Redo (Ctrl+Y) to implement custom logic or restrict user actions. -The EditControl Undo and Redo functionality can be modify or disable by using the IsUndoEnabled and IsRedoEnabled property of Editcontrol. +## Key Features Demonstrated in This Sample + +- Disable Undo and Redo functionality using the built-in properties IsUndoEnabled and IsRedoEnabled. +- Intercept keyboard shortcuts using the PreviewKeyDown event. +- Apply conditional logic to enable or disable specific shortcuts dynamically. + +## Disable Undo and Redo Using Properties +The simplest way to disable these features is by setting the properties: ```C# public Window1() @@ -10,7 +17,8 @@ Edit1.PreviewKeyDown += Edit1_PreviewKeyDown; } ``` -You can also use our PreviewKeyDown event to modify this Undo and Redo features using the following code: +## Modify Shortcuts Using PreviewKeyDown Event +You can also customize shortcut behavior by handling the PreviewKeyDown event: ```C# private void Edit1_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) @@ -23,3 +31,4 @@ Edit1.IsUndoEnabled = true; } ``` +This approach gives you full control over how shortcuts behave, allowing you to implement advanced scenarios such as enabling Undo only for certain operations or disabling it entirely in read-only modes. \ No newline at end of file