Leadtools.Windows.Controls Send comments on this topic. | Back to Introduction - LEADTOOLS WPF | Help Version 16.5.9.25
MagnifyGlass Property
See Also  Example
Leadtools.Windows.Controls Namespace > BitmapSourceViewer Class : MagnifyGlass Property





Gets or sets the MagnifyGlass object used to perform Magnifying Glass operations for this BitmapSourceViewer.

Syntax

Visual Basic (Declaration) 
Public Property MagnifyGlass As MagnifyGlass
Visual Basic (Usage)Copy Code
Dim instance As BitmapSourceViewer
Dim value As MagnifyGlass
 
instance.MagnifyGlass = value
 
value = instance.MagnifyGlass
C# 
public MagnifyGlass MagnifyGlass {get; set;}
C++/CLI 
public:
property MagnifyGlass^ MagnifyGlass {
   MagnifyGlass^ get();
   void set (MagnifyGlass^ value);
}
XAML Attributes Usage 

<object MagnifyGlass=

Dependencies Property Information 

Identifier field

ScaleFactorProperty

Metadata properties set to true

None

XAML Property Element Usage 

<object> <object.MagnifyGlass> <MagnifyGlass .../> </object.MagnifyGlass> </object>

XAML Attributes Usage 

<object MagnifyGlass=

Dependencies Property Information 

Identifier field

ScaleFactorProperty

Metadata properties set to true

None

XAML Property Element Usage 

<object> <object.MagnifyGlass> <MagnifyGlass .../> </object.MagnifyGlass> </object>

Return Value

The MagnifyGlass object used to perform Magnifying Glass operations for this BitmapSourceViewer.

Example

This example lets you create your own custom magnifying glass. The custom magnify glass is drawn with a red "X" for the crosshair The border is a blue rectangle.

Visual BasicCopy Code
Dim magnifyGlass As MagnifyGlass = New MagnifyGlass()
C#Copy Code
MagnifyGlass magnifyGlass = new MagnifyGlass();
XAMLCopy Code
<Window x:Class="WPFSamples.BitmapSourceViewer" Height="600" Width="800" Title="Interactive MagnifyGlass Sample" 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"> 
  <DockPanel> 
    <Leadtools_Windows_Controls:BitmapSourceViewer Name="theViewer" Source="file:///C:\Program Files\LEAD Technologies\LEADTOOLS 16\Images\slave.jpg" DockPanel.Dock="Bottom" HorizontalAlignment="Center" VerticalAlignment="Bottom" InteractiveMode="MagnifyGlass" MagnifyGlass="150, 150, 1.5" InteractiveMagnifyGlass="viewer_InteractiveMagnifyGlass" /> 
  </DockPanel> 
</Window>

Remarks

You can derive your own class from MagnifyGlass, and then set this property to an instance of that class to perform your own Magnifying Glass processing (for example, change the way the crosshair is displayed).

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also