LEADTOOLS WinRT (Leadtools.Annotations.Core)
LEAD Technologies, Inc

Resources Property (AnnContainer)

Example 

Gets or sets the annotations resources used by this container. WinRT support
Syntax
public AnnResources Resources {get; set;}
 get_Resources();
set_Resources(value);

Property Value

The annotations resources used by this container. The default value is null.
Remarks

The annotations resources are images and rubber stamps used through the toolkit. Typically, you create one global AnnResources object and assign it to each container in your application.

Example
 
[TestMethod]
public void AnnContainer_Resources()
{
   // Assume Assets\Point.png is the picture you want to use with Point objects
   // Create a new instance of AnnResources if the container does not already have one
   AnnResources resources = _automation.Container.Resources;
   if (resources == null)
   {
      resources = new AnnResources();
      _automation.Container.Resources = resources;
   }
   // Get the images collection
   IList<AnnPicture> imagesResources = resources.Images;
   // Add our picture to it
   imagesResources.Add(new AnnPicture(@"ms-appx:///Assets/Point.png"));
   int pictureIndex = imagesResources.Count - 1;

   // Get the container and set the resources into it
   AnnContainer container = _automation.Container;
   container.Resources = resources;

   double inch = 720.0;

   // Add a point object at 1in,1in
   AnnPointObject pointObj = new AnnPointObject();
   pointObj.Points[0] = LeadPointDHelper.Create(1 * inch, 1 * inch);
   // Set the picture
   pointObj.DefaultPicture = pictureIndex;

   // Add it to the container
   container.Children.Add(pointObj);

   // Select it
   _automation.SelectObject(pointObj);
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AnnContainer Class
AnnContainer Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.