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. Image for the cookie policy date
close icon

Bug with Code Snippets and Autoindentation

Hi

To reproduce it, open the indentation guidelines demo.

Enter if, press tab
You will have the following display :

if (true)
{

}

instead of

if (true)
{

}

(there is a tab before { and } )

1 Reply

J. J.Nagarajan Syncfusion Team October 18, 2007 12:03 AM UTC

Hi Stephane,

You can avoid this additional tab before the braces by adding the following code to your form's constructor. Please refer the below sample that demonstrates this.

[C#]

CodeSnippet snippet = this.editControl1.GetSnippetByTitle("if");
snippet.Code = snippet.Code.Replace("\t", "");


I have attached the sample for your reference.

http://websamples.syncfusion.com/samples/Edit/I38257/main.htm

Please let me know if you have any other questions.

Regards,
Nagaraj

Loader.
Live Chat Icon For mobile
Up arrow icon