yes, you're right, my example was not correct enough.
I'm attaching my sample now.
The steps are:
1. I add Editor, in Form_Load I set this.editControl1.ApplyConfiguration(KnownLanguages.VBNET);
2. I have button named C#, in OnClick method I write the following:
string custCode = "//**************************************************\r";
custCode += "// Custom C# code for " + "\r";
custCode += "// Created: " + System.DateTime.Now.ToString() + "\r";
custCode += "//**************************************************\r";
//this line is for show that in fact syntax is VB
custCode += "'this line is for show that the syntax is not shown correctly \r";
custCode += "Imports System\r";
custCode += "using System;\r";
this.editControl1.Text = custCode;
this.editControl1.ApplyConfiguration(KnownLanguages.CSharp); // won't be c#
So, I add some text and set configuration to the c#.
When I press this button, syntax highlighting won't change to C#.
I can set configuration before setting the text, in this case, C# will be shown correctly.
But in this case, if I click another button - VB.NET, where configuration is changed to the VB.NET, syntax will remain C#.
SampleTest_a3d0f97a.zip