←Select platform

AnnStickyNoteObject Class


Defines an annotation sticky note object.


WinRT C#
public class AnnStickyNoteObject : AnnObject 
Public Class AnnStickyNoteObject  
   Inherits Leadtools.Annotations.Core.AnnObject 
   Implements Leadtools.Annotations.Core.IAnnObjectCloneable  
public sealed class AnnStickyNoteObject : Leadtools.Annotations.Core.IAnnObjectCloneable   
@interface LTAnnStickyNoteObject : LTAnnObject<NSCoding,NSCopying> 
public class AnnStickyNoteObject extends AnnObject 
function Leadtools.Annotations.Core.AnnStickyNoteObject() 
   ref class AnnStickyNoteObject : AnnObject 


The sticky note object is a Picture rendered around single point (the center). This point is the first entry in the Points collection and all others are ignored. This object does not support fill, stroke nor font.

This object supports using the AnnObject.SelectionStroke and by default when the value of IsSelected is true, it will use the stroke to draw a rectangle around the image instead of using a selection thumb.

With the automated functions, in design mode, the sticky point object is formed with a click or tap event.

Programmatically, the boundaries and location of the sticky note object can be controlled using the following properties:

  • AnnObject.Bounds: This value returns the rectangle formed from the image size and the center.
  • Points: The first item is the center of the object.

Each object can be transformed with the following methods:

The AnnStickyNoteObject class inherits a number of properties from the AnnObject class, it does not support fill, stroke or font by overrides SupportsSelectionStroke to return true.

The name of the sticky note object can be controlled using Labels property, inherited from the AnnObject class.

An object can be part of a group annotation object or part of a container object. It cannot be part of both a group and a container at the same time.

The following properties can also be used to programmatically set characteristics of an AnnStickyNoteObject:


using LeadtoolsExamples.Common; 
using Leadtools.Annotations.Automation; 
using Leadtools.Annotations.Core; 
using Leadtools.Codecs; 
using Leadtools.Annotations.WinForms; 
public void AnnCore_AnnStickyNoteObject() 
   // assumes _automation is valid 
   // Create a new instance of AnnResources if the container does not already have one 
   AnnResources resources = _automation.Manager.Resources; 
   if (resources == null) 
      resources = new AnnResources(); 
   // Get the images collection 
   IList<AnnPicture> imagesResources = resources.Images; 
   // Add our picture to it 
   imagesResources.Add(new AnnPicture(@"ms-appx:///Assets/StickyNote.png")); 
   int pictureIndex = imagesResources.Count - 1; 
   double inch = 720.0; 
   // Add a Sticky Note object 
   AnnStickyNoteObject stickyNoteObj = new AnnStickyNoteObject(); 
   // Set the points for the Sticky Note 
   stickyNoteObj.Points.Add(LeadPointD.Create(1 * inch, 1 * inch)); 
   stickyNoteObj.Points.Add(LeadPointD.Create(2 * inch, 1 * inch)); 
   stickyNoteObj.Points.Add(LeadPointD.Create(2 * inch, 2 * inch)); 
   stickyNoteObj.Points.Add(LeadPointD.Create(1 * inch, 2 * inch)); 
   // Set the picture 
   stickyNoteObj.DefaultPicture = pictureIndex; 
   // Set the MetaData 
   stickyNoteObj.Metadata[AnnObject.ContentMetadataKey] = "This is content"; 
   stickyNoteObj.Metadata[AnnObject.AuthorMetadataKey] = Environment.UserName; 
   stickyNoteObj.Metadata[AnnObject.CreatedMetadataKey] = DateTime.Now.ToString(); 
   // Add the object to the automation container 


Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Core Assembly