Occurs when the user performs interactive scaling of the image display.
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 example scales the image when dragging the cursor on the image. Also, it displays the contents of the ImageViewer.InteractiveScale event in the console.
Visual Basic | Copy Code |
---|
Private Sub viewer_InteractiveScale(ByVal sender As Object, ByVal e As LineInteractiveEventArgs)
Console.WriteLine("InteractiveScale: 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_InteractiveScale(ByVal viewer As ImageViewer)
viewer.SetInteractiveModeCursor(InteractiveMode.MagnifyGlass, Cursors.SizeAll, Cursors.Arrow)
viewer.InteractiveMode = InteractiveMode.Scale
AddHandler viewer.InteractiveScale, AddressOf viewer_InteractiveScale
' Drag mouse across image to scale the image
' After you are done, you must remove the event handler as in below
'
' viewer.InteractiveScale -= new ImageViewer.InteractiveScaleEventHandler(viewer_InteractiveScale);
End Sub |
C# | Copy Code |
---|
private void viewer_InteractiveScale(object sender, LineInteractiveEventArgs e)
{
Console.WriteLine("InteractiveScale: e.Begin {0}, e.End{1}, e.Status {2}, e.Cancel {3}", e.Begin, e.End, e.Status, e.Cancel);
}
public void BitmapSourceViewer_InteractiveScale(ImageViewer viewer)
{
viewer.SetInteractiveModeCursor(InteractiveMode.MagnifyGlass, Cursors.SizeAll, Cursors.Arrow);
viewer.InteractiveMode = InteractiveMode.Scale;
viewer.InteractiveScale +=new EventHandler<LineInteractiveEventArgs>(viewer_InteractiveScale);
// Drag mouse across image to scale the image
// After you are done, you must remove the event handler as in below
//
// viewer.InteractiveScale -= new ImageViewer.InteractiveScaleEventHandler(viewer_InteractiveScale);
} |
SilverlightCSharp | Copy Code |
---|
private void viewer_InteractiveScale(object sender, LineInteractiveEventArgs e)
{
Console.WriteLine("InteractiveScale: e.Begin {0}, e.End{1}, e.Status {2}, e.Cancel {3}", e.Begin, e.End, e.Status, e.Cancel);
}
public void BitmapSourceViewer_InteractiveScale(ImageViewer viewer)
{
viewer.SetInteractiveModeCursor(InteractiveMode.MagnifyGlass, Cursors.SizeNS, Cursors.Arrow);
viewer.InteractiveMode = InteractiveMode.Scale;
viewer.InteractiveScale +=new EventHandler<LineInteractiveEventArgs>(viewer_InteractiveScale);
// Drag mouse across image to scale the image
// After you are done, you must remove the event handler as in below
//
// viewer.InteractiveScale -= new ImageViewer.InteractiveScaleEventHandler(viewer_InteractiveScale);
} |
SilverlightVB | Copy Code |
---|
Private Sub viewer_InteractiveScale(ByVal sender As Object, ByVal e As LineInteractiveEventArgs)
Console.WriteLine("InteractiveScale: 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_InteractiveScale(ByVal viewer As ImageViewer)
viewer.SetInteractiveModeCursor(InteractiveMode.MagnifyGlass, Cursors.SizeNS, Cursors.Arrow)
viewer.InteractiveMode = InteractiveMode.Scale
AddHandler viewer.InteractiveScale, AddressOf viewer_InteractiveScale
' Drag mouse across image to scale the image
' After you are done, you must remove the event handler as in below
'
' viewer.InteractiveScale -= new ImageViewer.InteractiveScaleEventHandler(viewer_InteractiveScale);
End Sub |
Remarks
Requirements
Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also