Gets or sets a value that indicates the current user interaction mode with the control's display. This is a dependency property.
public Leadtools.Windows.Controls.InteractiveMode InteractiveMode {get; set;}
Public Property InteractiveMode As Leadtools.Windows.Controls.InteractiveMode
public:
property Leadtools.Windows.Controls.InteractiveMode InteractiveMode {
Leadtools.Windows.Controls.InteractiveMode get();
void set ( Leadtools.Windows.Controls.InteractiveMode );
}
An InteractiveMode enumeration member that indicates the current user interaction mode with the control's display. Default value is InteractiveMode.None.
You can change the mouse cursor associated with a particular interactive mode with the SetInteractiveModeCursor method. For descriptions of the various interactive mode available, refer to InteractiveMode.
This example changes between interactive modes -- from none, to pan, to magnifying glass and back to none.
Imports Leadtools.Windows.Controls
Private Sub viewer_InteractiveModeChanged(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim viewer As ImageViewer = TryCast(sender, ImageViewer)
Dim s As String = String.Format("InteractiveMode changed to: {0}", viewer.InteractiveMode.ToString())
MessageBox.Show(s)
End Sub
Public Sub BitmapSourceViewer_InteractiveMode(ByVal viewer As ImageViewer)
AddHandler viewer.InteractiveModeChanged, AddressOf viewer_InteractiveModeChanged
AddHandler viewer.InteractivePan, AddressOf viewer_InteractivePan
Select Case viewer.InteractiveMode
Case InteractiveMode.None
viewer.InteractiveMode = InteractiveMode.Pan
Case InteractiveMode.Pan
viewer.InteractiveMode = InteractiveMode.MagnifyGlass
Case InteractiveMode.MagnifyGlass
viewer.InteractiveMode = InteractiveMode.ZoomTo
Case InteractiveMode.ZoomTo
viewer.InteractiveMode = InteractiveMode.None
End Select
RemoveHandler viewer.InteractiveModeChanged, AddressOf viewer_InteractiveModeChanged
End Sub
using Leadtools.Help;
using Leadtools.Windows.Controls;
private void viewer_InteractiveModeChanged(object sender, RoutedEventArgs e)
{
ImageViewer viewer = sender as ImageViewer;
string s = string.Format("InteractiveMode changed to: {0}", viewer.InteractiveMode.ToString());
MessageBox.Show(s);
}
public void BitmapSourceViewer_InteractiveMode(ImageViewer viewer)
{
viewer.InteractiveModeChanged += new RoutedPropertyChangedEventHandler<InteractiveMode>(viewer_InteractiveModeChanged);
viewer.InteractivePan +=new EventHandler<LineInteractiveEventArgs>(viewer_InteractivePan);
switch(viewer.InteractiveMode)
{
case InteractiveMode.None:
viewer.InteractiveMode = InteractiveMode.Pan;
break;
case InteractiveMode.Pan:
viewer.InteractiveMode = InteractiveMode.MagnifyGlass;
break;
case InteractiveMode.MagnifyGlass:
viewer.InteractiveMode = InteractiveMode.ZoomTo;
break;
case InteractiveMode.ZoomTo:
viewer.InteractiveMode = InteractiveMode.None;
break;
}
viewer.InteractiveModeChanged -= new RoutedPropertyChangedEventHandler<InteractiveMode>(viewer_InteractiveModeChanged);
}
using Leadtools.Help;
using Leadtools.Windows.Controls;
private void viewer_InteractiveModeChanged(object sender, RoutedEventArgs e)
{
ImageViewer viewer = sender as ImageViewer;
string s = string.Format("InteractiveMode changed to: {0}", viewer.InteractiveMode.ToString());
MessageBox.Show(s);
}
public void BitmapSourceViewer_InteractiveMode(ImageViewer viewer)
{
viewer.InteractiveModeChanged += new RoutedPropertyChangedEventHandler<InteractiveMode>(viewer_InteractiveModeChanged);
viewer.InteractivePan +=new EventHandler<LineInteractiveEventArgs>(viewer_InteractivePan);
switch(viewer.InteractiveMode)
{
case InteractiveMode.None:
viewer.InteractiveMode = InteractiveMode.Pan;
break;
case InteractiveMode.Pan:
viewer.InteractiveMode = InteractiveMode.MagnifyGlass;
break;
case InteractiveMode.MagnifyGlass:
viewer.InteractiveMode = InteractiveMode.ZoomTo;
break;
case InteractiveMode.ZoomTo:
viewer.InteractiveMode = InteractiveMode.None;
break;
}
viewer.InteractiveModeChanged -= new RoutedPropertyChangedEventHandler<InteractiveMode>(viewer_InteractiveModeChanged);
}
Imports Leadtools
Imports Leadtools.Windows.Controls
Private Sub viewer_InteractiveModeChanged(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim viewer As ImageViewer = TryCast(sender, ImageViewer)
Dim s As String = String.Format("InteractiveMode changed to: {0}", viewer.InteractiveMode.ToString())
MessageBox.Show(s)
End Sub
Public Sub BitmapSourceViewer_InteractiveMode(ByVal viewer As ImageViewer)
AddHandler viewer.InteractiveModeChanged, AddressOf viewer_InteractiveModeChanged
AddHandler viewer.InteractivePan, AddressOf viewer_InteractivePan
Select Case viewer.InteractiveMode
Case InteractiveMode.None
viewer.InteractiveMode = InteractiveMode.Pan
Case InteractiveMode.Pan
viewer.InteractiveMode = InteractiveMode.MagnifyGlass
Case InteractiveMode.MagnifyGlass
viewer.InteractiveMode = InteractiveMode.ZoomTo
Case InteractiveMode.ZoomTo
viewer.InteractiveMode = InteractiveMode.None
End Select
RemoveHandler viewer.InteractiveModeChanged, AddressOf viewer_InteractiveModeChanged
End Sub
<Window x:Class="WPFSamples.ImageViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Leadtools_Windows_Controls="clr-namespace:Leadtools.Windows.Controls;assembly=Leadtools.Windows.Controls"
Height="600" Width="800" Title="InteractiveMode Sample">
<DockPanel>
<Leadtools_Windows_Controls:ImageViewer
Name="theViewer"
Source="file:///c:\users\Public\Documents\LEADTOOLS Images\cannon.jpg"
DockPanel.Dock= "Bottom"
HorizontalAlignment="Center" VerticalAlignment="Center"
InteractiveMode="Scale"
InteractiveModeChanged ="theViewer_InteractiveModeChanged"/>
</DockPanel>
</Window>
Products |
Support |
Feedback: InteractiveMode Property - Leadtools.Windows.Controls |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.