Defines a dynamic context.
Namespace: CleanCode.ChameleonRichTextBoxControlsAssembly: CleanCode.ChameleonRichTextBoxControls (in CleanCode.ChameleonRichTextBoxControls.dll) Version: 1.2.3.0 (1.2.03)
public void DefineContext(
string contextName,
string fileName
)
public void DefineContext(
string contextName,
string fileName
)
Public Sub DefineContext ( _
contextName As String, _
fileName As String _
)
Public Sub DefineContext ( _
contextName As String, _
fileName As String _
)
public:
void DefineContext(
String^ contextName,
String^ fileName
)
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";
ChameleonRichTextBox crtb = new ChameleonRichTextBox();
crtb.DefineContext("MyContext", "C:\usr\tmp\stuff.xml");
crtb.EditorContextName = "MyContext";