LEADTOOLS For .NET Class Library Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.28
WPF_Blend_magnifying_glass

Take the following steps to create and run a program in Microsoft Expression Blend to add a magnifying glass effect using LEADTOOLS RasterImageViewer.

  1. Start Microsoft Expression Blend.
  2. In File-->Open Project find the project ImageBrowser you created in previous tutorial. Find the ImageBrowser.csproj file name and choose Open.
  3. Choose Objects and Timeline-->LayoutRoot, then RasterImageViewer.
  4. Resize the Window and RasterImageViewer to accommodate a picture of approximately 800X600 (Width x Height in pixels)
  5. On the right side of the screen, find and select Properties-->Miscellaneous-->InteractiveMode, and set it to MagnifyGlass.
  6. Build, and Run the program to test it (Project-->Test Project or F5). Over the picture, left-click to display the magnifying glass. It can be moved by holding the left mouse button down. You can set the magnifying glass to a fixed position by left-clicking and holding it, then right-clicking.
  7. Notice that additional effects are also available in InteractiveMode that you can try out.
  8. [Window1.xaml]
          
    
                  <Window
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     x:Class="ImageBrowser.Window1"
                     x:Name="Window"
                     Title="Window1"
                     Width="1000" Height="800" xmlns:Leadtools_Windows_Controls="clr-namespace:Leadtools.Windows.Controls;assembly="Leadtools.Windows.Controls">
                     <Leadtools_Windows_Controls:RasterImageViewer Width="800" Height="600" Content="RasterImageViewer" Source="NaturalFruits.jpg" InteractiveMode="MagnifyGlass"/>
                  </Window>