LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
AnnStampObject Class
See Also  Members  
Leadtools.Windows.Annotations Namespace : AnnStampObject Class



The AnnStampObject Class supports WPF/Silverlight.

The AnnStampObject Class is available in LEADTOOLS Document and Medical Imaging toolkits.

Defines an annotation stamp object.

Object Model

AnnStampObject ClassAnnPicture Class

Syntax

Visual Basic (Declaration) 
Public Class AnnStampObject 
   Inherits AnnTextObject
   Implements IAnnFontIAnnHeaderIAnnObjectIAnnPictureIAnnRectangleIAnnText 
Visual Basic (Usage)Copy Code
Dim instance As AnnStampObject
C# 
public class AnnStampObject : AnnTextObject, IAnnFontIAnnHeaderIAnnObjectIAnnPictureIAnnRectangleIAnnText  
C++/CLI 
public ref class AnnStampObject : public AnnTextObject, IAnnFontIAnnHeaderIAnnObjectIAnnPictureIAnnRectangleIAnnText  

Example

For XAML example, refer to AnnGroupObject.

This example creates a new stamp object.

Visual BasicCopy Code
Private Sub AnnStampObject_AnnStampObject(ByVal container As AnnContainer, ByVal imageFileName As String)
   Dim stamp As AnnStampObject = New AnnStampObject()
   Dim pic As AnnPicture = New AnnPicture(New BitmapImage(New Uri(imageFileName)))
   pic.TransparentMode = AnnTransparentMode.None
   pic.TransparentColor = Colors.Black
   stamp.Picture = pic
   stamp.Rect = New Rect(100, 200, 400, 600)
   container.Children.Add(stamp)
End Sub
C#Copy Code
private void AnnStampObject_AnnStampObject(AnnContainer container, string imageFileName)
{
   AnnStampObject stamp = new AnnStampObject();
   AnnPicture pic = new AnnPicture(new BitmapImage(new Uri(imageFileName)));
   stamp.Rect = new Rect(100, 200, 400, 600);
   pic.TransparentMode = AnnTransparentMode.None;
   pic.TransparentColor = Colors.Black;
   stamp.Picture = pic;
   container.Children.Add(stamp);
}
SilverlightCSharpCopy Code
SilverlightVBCopy Code

Remarks

The stamp annotation object can be a picture or a text string in a rectangular frame. If the stamp object has a picture, it will be scaled to fit the bounding rectangle and drawn. If the stamp does not have a picture, the text will be drawn.

This class implements the IAnnPicture interface and accesses the IAnnPicture.Picture property that handles the picture associated with the annotation object.

For more information, refer to Using Pictures in WPF Annotation Objects

For more information about the stamp annotation object refer to AnnStampObject for WPF. For more information about the automated stamp annotation object, refer to WPF Annotation Objects - Automated Features and WPF Automated Annotations - Stamp Picture Tab.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         Leadtools.Windows.Annotations.AnnObject
            Leadtools.Windows.Annotations.AnnRectangleObject
               Leadtools.Windows.Annotations.AnnTextObject
                  Leadtools.Windows.Annotations.AnnStampObject

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

AnnStampObject requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.