[]
Occurs after an item is selected in the table of contents treeview.
public event TreeViewEventHandler TableOfContentsAfterSelect
Type | Description |
---|---|
TreeViewEventHandler | Occurs after an item is selected in the table of contents treeview. |
The TreeViewEventArgs provides information about the selected item, enabling event handlers to access the item's properties and take appropriate actions, such as navigating to the corresponding section in the document.
// Assuming 'viewer' is an instance of the Viewer class
// Subscribe to the TableOfContentsAfterSelect event
viewer.TableOfContentsAfterSelect += Viewer_TableOfContentsAfterSelect;
// Event handler for TableOfContentsAfterSelect
private void Viewer_TableOfContentsAfterSelect(object sender, TreeViewEventArgs e)
{
var selectedNodeText = e.Node.Text;
MessageBox.Show($"You have selected: {selectedNodeText}", "TOC Selection");
}