C1ZoomCommandProvider Overview > C1ZoomCommandProvider Custom Action |
You can access the Form which hosts the ControlBar by using the C1ZoomCommandProvider.OwnerForm property. Use the following code to close the Form.
C# |
Copy Code
|
---|---|
c1ZoomCommandProvider1.OwnerForm.Close(); |
Visual Basic |
Copy Code
|
---|---|
C1ZoomCommandProvider1.OwnerForm.Close() |
You can access the C1Zoom component which is in the Form by using the C1ZoomCommandProvider.OwnerC1Zoom property. Use the following code to scroll to the right-down direction.
C# |
Copy Code
|
---|---|
private void button1_Click(object sender, EventArgs e) { Point currentLocation = c1ZoomCommandProvider1.OwnerC1Zoom.ScrollLocation; currentLocation.X -= 100; currentLocation.Y -= 100; C1ZoomCommandProvider1.OwnerC1Zoom.ScrollLocation = currentLocation; } |
Visual Basic |
Copy Code
|
---|---|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim currentLocation As Point = C1ZoomCommandProvider1.OwnerC1Zoom.ScrollLocation currentLocation.X -= 100 currentLocation.Y -= 100 C1ZoomCommandProvider1.OwnerC1Zoom.ScrollLocation = currentLocation End Sub |