Spread Windows Forms 11.0 Product Documentation
AnnotationModeEnding Event
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : AnnotationModeEnding Event
Occurs when the user ends annotation mode.
Syntax
'Declaration
 
Public Event AnnotationModeEnding As AnnotationModeEndingEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As AnnotationModeEndingEventHandler
 
AddHandler instance.AnnotationModeEnding, handler
public event AnnotationModeEndingEventHandler AnnotationModeEnding
Event Data

The event handler receives an argument of type AnnotationModeEventArgs containing data related to this event. The following AnnotationModeEventArgs properties provide information specific to this event.

PropertyDescription
(Inherited from System.ComponentModel.CancelEventArgs)
Gets the drawing surface control.  
Remarks

This event is raised by the OnAnnotationModeEnding method when the user is changing the active sheet.

For more details on the individual event arguments, refer to AnnotationModeEventArgs members.

Example
This example uses the AnnotationModeEnding event.
private void button1_Click(object sender, EventArgs e)
        {
            fpSpread1.StartAnnotationMode(true);
            //fpSpread1.StartAnnotationMode();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            fpSpread1.StopAnnotationMode();
        }

        private void fpSpread1_AnnotationModeStarting(object sender, FarPoint.Win.Spread.AnnotationModeEventArgs e)
        {
            
            e.DrawingSurface.ForeColor = Color.BlueViolet;
            e.DrawingSurface.BackColor = Color.Thistle;
        }

        private void fpSpread1_AnnotationModeEnding(object sender, FarPoint.Win.Spread.AnnotationModeEventArgs e)
        {
            listBox1.Items.Add("Stop Drawing");           
        }
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        fpSpread1.StartAnnotationMode(True)
        'fpSpread1.StartAnnotationMode()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        fpSpread1.StopAnnotationMode()
    End Sub

    Private Sub fpSpread1_AnnotationModeStarting(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.AnnotationModeEventArgs) Handles fpSpread1.AnnotationModeStarting
        e.DrawingSurface.ForeColor = Color.BlueViolet
        e.DrawingSurface.BackColor = Color.Thistle
    End Sub

    Private Sub fpSpread1_AnnotationModeEnding(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.AnnotationModeEventArgs) Handles fpSpread1.AnnotationModeEnding
        ListBox1.Items.Add("Stop Drawing")
    End Sub
See Also