We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Is this proper way to disable shortcut keys of SfRichTextBoxAdv?

Thread ID:





125327 Aug 8,2016 05:43 PM Aug 9,2016 01:13 AM WPF 1
Tags: SfRichTextBoxAdv
Dat Vo
Asked On August 8, 2016 05:43 PM

In my program, I want to manually process the New/Open/Save commands, but SfRichTextBoxAdv takes priority of those hotkeys. Therefore currently I use this code to remove them:

        public MainWindow()

            var removingGestures = new List<InputBinding>();
            foreach (InputBinding inputBinding in this.documentEditor.InputBindings)
                var gesture = inputBinding.Gesture as KeyGesture;

                if (gesture != null && gesture.Modifiers == ModifierKeys.Control)
                    if (gesture.Key == Key.O) { removingGestures.Add(inputBinding); }
                    if (gesture.Key == Key.S) { removingGestures.Add(inputBinding); }
                    if (gesture.Key == Key.N) { removingGestures.Add(inputBinding); }

            foreach (var gesture in removingGestures)

            this.DataContext = this.Model = new MainPageViewModel();

Just want to ask if this is the proper way? Is there any property I can set to disable the default behaviors?

Emmima Josephine Jeyapaul [Syncfusion]
Replied On August 9, 2016 01:13 AM

Hi Dat Vo, 
Yes, you can proceed with your code for disabling default input key binding (New/Open/Save commands) in SfRichTextBoxAdv control. Currently there is no property (API) available to disable the default behaviours. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.