Leadtools.Windows.Annotations Requires Document/Medical license. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
AnnStampObject Class
See Also  Members   Example 
Leadtools.Windows.Annotations Namespace : AnnStampObject Class





Defines an annotation stamp object.

Object Model




Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnStampObject 
   Inherits AnnTextObject
   Implements IAnnPictureObjectIAnnTextObject 
Visual Basic (Usage)Copy Code
Dim instance As AnnStampObject
C# 
[SerializableAttribute()]
public class AnnStampObject : AnnTextObject, IAnnPictureObjectIAnnTextObject  
C++/CLI 
[SerializableAttribute()]
public ref class AnnStampObject : public AnnTextObject, IAnnPictureObjectIAnnTextObject  
XAML Object Element Usage 

<AnnStampObject .../>

XAML Object Element Usage 

<AnnStampObject .../>

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 = AnnPictureTransparentMode.None
  pic.TransparentColor = Colors.Black
  stamp.Picture = pic
  stamp.Left = 100
  stamp.Top = 200
  stamp.Width = 400
  stamp.Height = 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))); 
   pic.TransparentMode = AnnPictureTransparentMode.None; 
   pic.TransparentColor = Colors.Black; 
   stamp.Picture = pic; 
   stamp.Left = 100; 
   stamp.Top = 200; 
   stamp.Width = 400; 
   stamp.Height = 600; 
   container.Children.Add(stamp); 
}

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 IAnnPictureObject interface and accesses the IAnnPictureObject.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
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  Leadtools.Windows.Annotations.AnnObjectBase
                     Leadtools.Windows.Annotations.AnnRectangleObject
                        Leadtools.Windows.Annotations.AnnTextObject
                           Leadtools.Windows.Annotations.AnnStampObject

Requirements

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

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.