LEADTOOLS Windows Forms (Leadtools.WinForms assembly)

ScrollViewer Event

Show in webframe
Example 





Occurs when either the horizontal or vertical scroll bar of the RasterImageViewer changes.
Syntax
public event EventHandler ScrollViewer
'Declaration
 
Public Event ScrollViewer As EventHandler
'Usage
 
Dim instance As RasterImageViewer
Dim handler As EventHandler
 
AddHandler instance.ScrollViewer, handler

            

            
public:
event EventHandler^ ScrollViewer
Remarks
This event is raised if the horizontal or vertical scroll bar of the RasterImageViewer changes, either through programmatic modification or user interaction.
Example
Copy Code  
Imports Leadtools.WinForms
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Color
Imports Leadtools.Drawing

Private Sub viewer_ScrollViewer(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As RasterImageViewer = CType(IIf(TypeOf sender Is RasterImageViewer, sender, Nothing), RasterImageViewer)
   Dim s As String = String.Format("ScrollPosition: {0}", viewer.ScrollPosition)
   Console.WriteLine(s)
End Sub
Public Sub RasterImageViewer_ScrollViewer(ByVal viewer As RasterImageViewer)
   AddHandler viewer.ScrollViewer, AddressOf viewer_ScrollViewer

   MessageBox.Show("Scroll the image and the 'ScrollViewer' event gets fired")
   ' or do something in code to cause a scroll
End Sub
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Color;
using Leadtools.Drawing;

private void viewer_ScrollViewer(object sender, EventArgs e)
{
   RasterImageViewer viewer = sender as RasterImageViewer;
   string s = string.Format("ScrollPosition: {0}", viewer.ScrollPosition);
   Console.WriteLine(s);
}
public void RasterImageViewer_ScrollViewer(RasterImageViewer viewer)
{
   viewer.ScrollViewer += new EventHandler(viewer_ScrollViewer);

   MessageBox.Show("Scroll the image and the 'ScrollViewer' event gets fired");
   // or do something in code to cause a scroll
}
Requirements

Target Platforms

See Also

Reference

RasterImageViewer Class
RasterImageViewer Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.