ChameleonRichTextBox DefineContext Method CleanCode C# Libraries v1.2.03 API
Defines a dynamic context.

Namespace: CleanCode.ChameleonRichTextBoxControls
Assembly: CleanCode.ChameleonRichTextBoxControls (in CleanCode.ChameleonRichTextBoxControls.dll) Version: (1.2.03)

public void DefineContext(
	string contextName,
	string fileName

To use a pre-defined context you simply need to assign a context name to the EditorContextName property. To setup a custom context at runtime takes only one additional line of code. Define a context file to point to a context file with this method, then assign that name to EditorContextName. Example:
ChameleonRichTextBox crtb = new ChameleonRichTextBox();
crtb.DefineContext("MyContext", "C:\usr\tmp\stuff.xml");
crtb.EditorContextName = "MyContext";
See Also