This project is read-only.

Canceling a NavigationPane select/deselect event

Topics: Knowledge Base
Jul 31, 2006 at 5:43 PM
In beta 2 we added Deselecting as an event on the NavigationPane. If you attach to this event you can use NavigationPaneCancelEventArgs.Cancel parameter to stop the selected button from becoming current.


private void navigationPane1_Deselecting(object sender, Ascend.Windows.Forms.NavigationPaneCancelEventArgs e)
DialogResult result = MessageBox.Show(this, "Do you want to change tabs?", "Test", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.No)
e.Cancel = true;