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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

About Code Snippet

Thread ID:





57269 Feb 28,2007 05:53 PM UTC Mar 12,2007 04:50 PM UTC WinForms 5
Tags: EditControl
Asked On February 28, 2007 05:53 PM UTC

The version 4.4 of Edit Control has new feature - "VS 2005 like code snippets". I want to clear up some not so obvious things concerned to this new feature.

1. As all know Ctrl + ` is a way for an end-user to see box with snippets. May I(as developer) change this key combination?

2. Could say that I have snippet 'Try...Finally'. Can I do it like this: when user press Ctrl+Alt+T(for example) code snippets box doesn't appear but 'Try...Finally' snippet directly inserted into the text and user can start filling the fields of this snippet?

I thank in advance for your answers!

Administrator [Syncfusion]
Replied On March 2, 2007 12:04 AM UTC

Hi Developer,

1. It is possible to change the key combination to see the Code Snippets using the RegisteringDefaultKeyBindings event. I have attached a sample that illustrates this. Let me know if this meets your requirements.


2. I am afraid, this feature is currently not available in the EditControl. We have considered this as feature request and will notify you when the feature has been implemented.

Thank you for using Syncfusion products.


Replied On March 2, 2007 06:10 PM UTC

1. Works very nice and this is exactly what I want - thanks a lot!
2. I see. Be hopefully waiting news about this feature...

Replied On March 3, 2007 05:25 PM UTC

And... by the way...

In your example all snippets defined twice. Let's take for concretization snippet 'struct'. I see, that this snippet was defined in:

1. config.xml file - CodeSnippetsContainer tag and so on...
2. struct.snippet file by path [Project_Folder]\Snippets\C#\Struct\

Both definitions are identical. What the point to do double work?? May be I just don't understand something?

Replied On March 9, 2007 01:24 PM UTC

And... by the way number N2...

I think I found bug. Not in your sample, but in EditControl itself. To see this bug:

1. Take sample from your post just above and start it. Try to work with "Try" snippet just to be sure that all work fine.
2. Now in Form1 constructor add line:
public Form1()
this.editControl1.UseTabs = false;
Again try to insert the same snippet. You will get exception:

"Value cannot be null. Parameter name: start"

Administrator [Syncfusion]
Replied On March 12, 2007 04:50 PM UTC

Hi Developer,

1. Code snippets can be created by using the configuration file or by using the static Extract method of the CodeSnippetsExtractor class.

2. The issue when UseTabs is used has been fixed internally. Please create a Direct-Trac incident if you would like to receive the patch that contains the fix.

Thank for your patience.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon