LEADTOOLS Windows Forms (Leadtools.WinForms assembly)
LEAD Technologies, Inc

BorderStyleChanged Event (RasterImageViewer)

Example 





Occurs when the value of the BorderStyle property changes.
Syntax
public event EventHandler BorderStyleChanged
'Declaration
 
Public Event BorderStyleChanged As EventHandler
'Usage
 
Dim instance As RasterImageViewer
Dim handler As EventHandler
 
AddHandler instance.BorderStyleChanged, handler
public event EventHandler BorderStyleChanged
add_BorderStyleChanged(function(sender, e))
remove_BorderStyleChanged(function(sender, e))

public:
event EventHandler^ BorderStyleChanged
Remarks
This event is raised if the BorderStyle property is changed by either a programmatic modification or user interaction.
Example
 
Private Sub viewer_BorderStyleChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As RasterImageViewer = CType(IIf(TypeOf sender Is RasterImageViewer, sender, Nothing), RasterImageViewer)
   MessageBox.Show(viewer.BorderStyle.ToString())
End Sub
Public Sub RasterImageViewer_BorderStyleChanged(ByVal viewer As RasterImageViewer)
   AddHandler viewer.BorderStyleChanged, AddressOf viewer_BorderStyleChanged

   If viewer.BorderStyle = BorderStyle.Fixed3D Then
      viewer.BorderStyle = BorderStyle.FixedSingle
   Else
      viewer.BorderStyle = BorderStyle.Fixed3D
   End If

   RemoveHandler viewer.BorderStyleChanged, AddressOf viewer_BorderStyleChanged
End Sub
private void viewer_BorderStyleChanged(object sender, EventArgs e)
{
   RasterImageViewer viewer = sender as RasterImageViewer;
   MessageBox.Show(viewer.BorderStyle.ToString());
}
public void RasterImageViewer_BorderStyleChanged(RasterImageViewer viewer)
{
   viewer.BorderStyleChanged += new EventHandler(viewer_BorderStyleChanged);

   if(viewer.BorderStyle == BorderStyle.Fixed3D)
      viewer.BorderStyle = BorderStyle.FixedSingle;
   else
      viewer.BorderStyle = BorderStyle.Fixed3D;

   viewer.BorderStyleChanged -= new EventHandler(viewer_BorderStyleChanged);
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RasterImageViewer Class
RasterImageViewer Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.