Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.10
|
Leadtools.WinForms Namespace > RasterImageViewer Class : BorderStyleChanged Event |
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
This example uses the BorderStyleChanged event to show how the border style has changed.
Imports Leadtools.WinForms Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.ImageProcessing.Color Imports Leadtools.Drawing 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
using Leadtools.WinForms; using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Color; using Leadtools.Drawing; 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); }