Occurs when the user is using the
MagnifyGlass on this control.
Supported in Silverlight, Windows Phone 7
Syntax
Event Data
The event handler receives an argument of type LineInteractiveEventArgs containing data related to this event. The following LineInteractiveEventArgs properties provide information specific to this event.
Example
This sample lets you drag the mouse to magnify parts of the image. Also, it displays the contents of the ImageViewer.InteractiveMagnifyGlass event in the console.
Visual Basic | Copy Code |
---|
Private Sub viewer_InteractiveMagnifyGlass(ByVal sender As Object, ByVal e As LineInteractiveEventArgs)
Dim ImageViewer As ImageViewer = TryCast(sender, ImageViewer)
Console.WriteLine("InteractiveMagnifyGlass: e.Begin {0}, e.End{1}, e.Status {2}, e.Cancel {3}", e.Begin, e.End, e.Status, e.Cancel)
End Sub
Public Sub BitmapSourceViewer_InteractiveMagnifyGlass(ByVal viewer As ImageViewer)
viewer.SetInteractiveModeCursor(InteractiveMode.MagnifyGlass, Cursors.Arrow, Cursors.None)
viewer.InteractiveMode = InteractiveMode.MagnifyGlass
AddHandler viewer.InteractiveMagnifyGlass, AddressOf viewer_InteractiveMagnifyGlass
' Drag mouse across image to see the magnifying glass
' After you are done, you must remove the event handler as in below
'
' viewer.InteractiveMagnifyGlass -= new ImageViewer.InteractiveMagnifyGlassEventHandler(viewer_InteractiveMagnifyGlass);
End Sub |
C# | Copy Code |
---|
private void viewer_InteractiveMagnifyGlass(object sender, LineInteractiveEventArgs e)
{
ImageViewer ImageViewer = sender as ImageViewer;
Console.WriteLine("InteractiveMagnifyGlass: e.Begin {0}, e.End{1}, e.Status {2}, e.Cancel {3}", e.Begin, e.End, e.Status, e.Cancel);
}
public void BitmapSourceViewer_InteractiveMagnifyGlass(ImageViewer viewer)
{
viewer.SetInteractiveModeCursor(InteractiveMode.MagnifyGlass, Cursors.Arrow, Cursors.None);
viewer.InteractiveMode = InteractiveMode.MagnifyGlass;
viewer.InteractiveMagnifyGlass +=new EventHandler<LineInteractiveEventArgs>(viewer_InteractiveMagnifyGlass);
// Drag mouse across image to see the magnifying glass
// After you are done, you must remove the event handler as in below
//
// viewer.InteractiveMagnifyGlass -= new ImageViewer.InteractiveMagnifyGlassEventHandler(viewer_InteractiveMagnifyGlass);
} |
SilverlightCSharp | Copy Code |
---|
private void viewer_InteractiveMagnifyGlass(object sender, LineInteractiveEventArgs e)
{
ImageViewer ImageViewer = sender as ImageViewer;
Console.WriteLine("InteractiveMagnifyGlass: e.Begin {0}, e.End{1}, e.Status {2}, e.Cancel {3}", e.Begin, e.End, e.Status, e.Cancel);
}
public void BitmapSourceViewer_InteractiveMagnifyGlass(ImageViewer viewer)
{
viewer.SetInteractiveModeCursor(InteractiveMode.MagnifyGlass, Cursors.Arrow, Cursors.None);
viewer.InteractiveMode = InteractiveMode.MagnifyGlass;
viewer.InteractiveMagnifyGlass +=new EventHandler<LineInteractiveEventArgs>(viewer_InteractiveMagnifyGlass);
// Drag mouse across image to see the magnifying glass
// After you are done, you must remove the event handler as in below
//
// viewer.InteractiveMagnifyGlass -= new ImageViewer.InteractiveMagnifyGlassEventHandler(viewer_InteractiveMagnifyGlass);
} |
SilverlightVB | Copy Code |
---|
Private Sub viewer_InteractiveMagnifyGlass(ByVal sender As Object, ByVal e As LineInteractiveEventArgs)
Dim ImageViewer As ImageViewer = TryCast(sender, ImageViewer)
Console.WriteLine("InteractiveMagnifyGlass: e.Begin {0}, e.End{1}, e.Status {2}, e.Cancel {3}", e.Begin, e.End, e.Status, e.Cancel)
End Sub
Public Sub BitmapSourceViewer_InteractiveMagnifyGlass(ByVal viewer As ImageViewer)
viewer.SetInteractiveModeCursor(InteractiveMode.MagnifyGlass, Cursors.Arrow, Cursors.None)
viewer.InteractiveMode = InteractiveMode.MagnifyGlass
AddHandler viewer.InteractiveMagnifyGlass, AddressOf viewer_InteractiveMagnifyGlass
' Drag mouse across image to see the magnifying glass
' After you are done, you must remove the event handler as in below
'
' viewer.InteractiveMagnifyGlass -= new ImageViewer.InteractiveMagnifyGlassEventHandler(viewer_InteractiveMagnifyGlass);
End Sub |
Remarks
Requirements
Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also