LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
Image Property
See Also 
Leadtools.Windows.Controls Namespace > RasterImageViewer Class : Image Property



Gets or sets the Leadtools.RasterImage to be displayed in this control. This is a dependency property. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
<TypeConverterAttribute("Leadtools.Codecs.RasterImageTypeConverter, Leadtools.Codecs, Version=17.0.0.0, Culture=neutral, PublicKeyToken=9cf889f53ea9b907")>
Public Property Image As RasterImage
Visual Basic (Usage)Copy Code
Dim instance As RasterImageViewer
Dim value As RasterImage
 
instance.Image = value
 
value = instance.Image
C# 
[TypeConverterAttribute("Leadtools.Codecs.RasterImageTypeConverter, Leadtools.Codecs, Version=17.0.0.0, Culture=neutral, PublicKeyToken=9cf889f53ea9b907")]
public RasterImage Image {get; set;}
C++/CLI 
[TypeConverterAttribute("Leadtools.Codecs.RasterImageTypeConverter, Leadtools.Codecs, Version=17.0.0.0, Culture=neutral, PublicKeyToken=9cf889f53ea9b907")]
public:
property RasterImage^ Image {
   RasterImage^ get();
   void set (    RasterImage^ value);
}

Property Value

The LEADTOOLS Leadtools.RasterImage object to be displayed in this control. The default value is a null reference (Nothing in Visual Basic).

Example

For XAML example, refer to RasterImageViewer.

For C#/VB examples, refer to RasterImageViewer.

Remarks

When the value of the Image property changes to a valid image, the values of Source will contain the WPF/Silverlight equivalent image.

In WPF/Silverlight, an image that is displayed must be an System.Windows.Media.ImageSource or one of its derived classes, the RasterImageViewer control keeps the ImageViewer.Source property synchronized with RasterImageViewer.Image, any changes that occur to the LEADTOOLS Leadtools.RasterImage is reflected in the Source property and a standard System.Windows.FrameworkPropertyMetadata.AffectsMeasure or System.Windows.FrameworkPropertyMetadata.AffectsRender is performed. Also, this control will subscribe to the RasterImage.Changed to monitor any changes that may occur to the image (through image processing for example) and reflect these changes to the Source property.

If the Source property is changed, the RasterImageViewer must be informed so it can reflect the changes into the Image object. The UpdateImageFromSource can be used to perform this task.

The control uses the RasterImageConverter.ConvertToSource to convert the LEADTOOLS Leadtools.RasterImage to a WPF/Silverlight System.Windows.Media.ImageSource. The value of the ConvertToSourceOptions property is used as the options parameter to this method.

This control uses the LEADTOOLS Leadtools.Codecs.RasterImageTypeConverter when loading a Leadtools.RasterImage from a XAML file. Refer to that class for more information and examples.

You can show the current region of interest in this Leadtools.RasterImage object by setting the value of ImageViewer.GeometryFrameType to GeometryFrameType.Fixed or GeometryFrameType.Animated. For more information, refer to ImageViewer.GeometryFrameType.

Requirements

Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also