Events in Windows Forms Navigation Drawer
28 Apr 20213 minutes to read
The below four events are implemented in Transition.
Opening
This Opening event occurs when expand Transition begins.
//Raises when expand Transition begins.
public event OpeningEventHandler Opening;
//Hooking the Opening event.
navigationDrawer1.Opening += new OpeningEventHandler(navigationDrawer1_Opening);
public void navigationDrawer1_Opening(object sender, OpeningEventArgs e)
{
MessageBox.Show(“Transition begins”);
}
'Raises when expand Transition begins.
Public event OpeningEventHandler Opening
'Hooking the Opening event.
navigationDrawer1.Opening += New OpeningEventHandler(navigationDrawer1_Opening)
Public Sub navigationDrawer1_Opening(ByVal sender As Object, ByVal e As OpeningEventArgs)
MessageBox.Show(“Transition begins”)
End Sub
Closing
The Closing Occurs when collapse Transition begins.
//Raises when collapse Transition begins.
public event ClosingEventHandler Closing;
//Hooking the Closing event.
navigationDrawer1.Closing += new ClosingEventHandler(navigationDrawer1_Closing);
void navigationDrawer1_Closing(object sender, CancelEventArgs e)
{
MessageBox.Show(“Collapses begins”);
}
'Raises when collapse Transition begins.
Public event ClosingEventHandler Closing
'Hooking the Closing event.
navigationDrawer1.Closing += New ClosingEventHandler(navigationDrawer1_Closing)
Private Sub navigationDrawer1_Closing(ByVal sender As Object, ByVal e As CancelEventArgs)
MessageBox.Show(“Collapses begins”)
End Sub
Opened
This Opened event occurs when expand Transition ends.
//Raises when expand Transition ends.
public event OpenedEventHandler Opened;
//Hooking the Opened event.
navigationDrawer1.Opened += new OpenedEventHandler(navigationDrawer1_Opened);
void navigationDrawer1_Opened(object sender, EventArgs e)
{
MessageBox.Show(“Transition Ends”);
}
'Raises when expand Transition ends.
Public event OpenedEventHandler Opened
'Hooking the Opened event.
navigationDrawer1.Opened += New OpenedEventHandler(navigationDrawer1_Opened)
Private Sub navigationDrawer1_Opened(ByVal sender As Object, ByVal e As EventArgs)
MessageBox.Show(“Transition Ends”)
End Sub
Closed
The Closed event occurs when collapse Transition ends.
//Raises when collapse Transition ends.
public event ClosedEventHandler Closed;
//Hooking the Closed event.
navigationDrawer1.Closed += new ClosedEventHandler(navigationDrawer1_Closed);
void navigationDrawer1_Closed(object sender, EventArgs e)
{
MessageBox.Show(“Collapses ends”);
}
'Raises when collapse Transition ends.
Public event ClosedEventHandler Closed
'Hooking the Closed event.
navigationDrawer1.Closed += New ClosedEventHandler(navigationDrawer1_Closed)
Private Sub navigationDrawer1_Closed(ByVal sender As Object, ByVal e As EventArgs)
MessageBox.Show(“Collapses ends”)
End Sub