To allow Help authors to activate and deactivate C1DynamicHelp authoring mode so that they can map topics in your application, you have a wide variety of options. You can use anything from a special keystroke combination to a registry node that, if present, activates authoring mode.
This example shows how to specify a keystroke combination.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
' toggle authoring mode when the user hits Ctrl+Shift+A Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs) If (e.KeyCode = Keys.A And e.Control And e.Shift) Then C1DynamicHelp1.AuthoringMode = Not C1DynamicHelp1.AuthoringMode End If MyBase.OnKeyDown(e) End Sub |
To write code in C#
C# |
Copy Code
|
---|---|
// toggle authoring mode when the user hits Ctrl+Shift+A override protected void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.A && e.Control && e.Shift) { c1DynamicHelp1.AuthoringMode = !c1DynamicHelp1.AuthoringMode; } base.OnKeyDown(e); } |
C1DynamicHelp authoring mode will be activated or deactivated when the user presses the Ctrl+Shift+A keys.