Error processing SSI file
(Leadtools.Controls)

Show in webframe

ImageViewerActiveItemInteractiveMode Class




Members 
Allows you to change the current active item in the viewer using the keyboard or mouse/touch.
Object Model
Syntax
public class ImageViewerActiveItemInteractiveMode : ImageViewerInteractiveMode 
'Declaration
 
Public Class ImageViewerActiveItemInteractiveMode 
   Inherits ImageViewerInteractiveMode
Remarks

ImageViewerActiveItemInteractiveMode derives from ImageViewerInteractiveMode and subscribes to the following events of the InteractiveService:

ImageViewerActiveItemInteractiveMode changes the current ActiveItem as follows:

For more information, refer to Image Viewer Interactive Modes.

Example
Copy Code  
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color

<TestMethod>
Public Sub ImageViewerActiveItemInteractiveModeExample()
   _imageViewer.InteractiveModes.BeginUpdate()
   Dim mode As New MyImageViewerInteractivMode
   mode.IsHoverEnabled = True
   mode.IsKeyboardEnabled = True
   _imageViewer.InteractiveModes.Add(mode)
   _imageViewer.InteractiveModes.EndUpdate()
End Sub
Public Class MyImageViewerInteractivMode : Inherits ImageViewerActiveItemInteractiveMode
   Public Sub New()
   End Sub

   Public Overrides ReadOnly Property Name() As String
      Get
         Return "MyImageViewerInteractivMode"
      End Get
   End Property

   Public Overrides ReadOnly Property Id() As Integer
      Get
         Return ImageViewerInteractiveMode.UserModeId
      End Get
   End Property

   Public Overrides Sub Start(ByVal imageViewer As ImageViewer)
      MyBase.Start(imageViewer)
      Dim service As InteractiveService = MyBase.InteractiveService
      AddHandler service.Tap, AddressOf service_Tap
   End Sub

   Public Overrides Sub [Stop](ByVal imageViewer As ImageViewer)
      If IsStarted Then
         Dim service As InteractiveService = MyBase.InteractiveService
         RemoveHandler service.Tap, AddressOf service_Tap
         MyBase.Stop(imageViewer)
      End If
   End Sub

   Private Sub service_Tap(ByVal sender As Object, ByVal e As InteractiveEventArgs)
      If CanStartWork(e) Then
         e.IsHandled = True
         OnWorkStarted(EventArgs.Empty)

         Dim imageViewer As ImageViewer = Me.ImageViewer

         imageViewer.BeginRender()
         ' ...
         ' ...
         ' ...
         ' set your render code here
         ' ...
         ' ...
         ' ...
         imageViewer.EndRender()

         OnWorkCompleted(EventArgs.Empty)
      End If
   End Sub
End Class
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;

public void ImageViewerActiveItemInteractiveModeExample()
{
   _imageViewer.InteractiveModes.BeginUpdate();
   _imageViewer.InteractiveModes.Add(new MyImageViewerInteractivMode { IsHoverEnabled = true, IsKeyboardEnabled = true });
   _imageViewer.InteractiveModes.EndUpdate();
}
Requirements

Target Platforms

See Also

Reference

ImageViewerActiveItemInteractiveMode Members
Leadtools.Controls Namespace

Error processing SSI file