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

SelectionObject Property

Example 

Gets or sets the selection object used by this AnnContainer. WinRT support
Syntax
public AnnSelectionObject SelectionObject {get; set;}
 get_SelectionObject();
set_SelectionObject(value);

Property Value

The AnnSelectionObject used by this AnnContainer. The default value is a new AnnSelectionObject instance with its Stroke set to a dark green AnnStroke object with length of 2. This value cannot be null.
Remarks

The selection object is always in the container and contains a collection (AnnSelectionObject.SelectedObjects) that holds references to the objects that are in a selected state. This object is used by the automation framework when multiple objects are selected and when drawing the selection "rectangle".

The style of this selection object can be changed from the default (dark green stroke of length 2) or you can derive your own custom object from AnnSelectionObject and use set it in this property.

The objects inside SelectionObject.SelectedObjects must be objects that already exist in the container, the automation frameworks keep this data in synch, therefore, use the AnnAutomation.SelectObject and AnnAutomation.SelectObjects methods to select and unselect objects from the container.

For more information, refer to the automation section in Programming with LEADTOOLS Annotations and cref="AC.Topics.WorkingWithAutomatedAnnotationsWinRT">Working with Automated Annotations in WinRT (Windows Store).

Example
 
[TestMethod]
public void AnnContainer_SelectionObject()
{
   // Get the selection object of the container
   AnnContainer container = _automation.Container;
   AnnSelectionObject selectionObject = container.SelectionObject;
   // Change its stroke
   selectionObject.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Black"), LeadLengthDHelper.Create(1));

   Debug.WriteLine("Use the new selection object now");
}
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.