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
SaveOriginalLocation Method
See Also 
Leadtools.Windows.Annotations Namespace > AnnObject Class : SaveOriginalLocation Method



Saves location information for an AnnObject. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Public Overridable Sub SaveOriginalLocation() 
Visual Basic (Usage)Copy Code
Dim instance As AnnObject
 
instance.SaveOriginalLocation()
C# 
public virtual void SaveOriginalLocation()
C++/CLI 
public:
virtual void SaveOriginalLocation(); 

Example

This example shows the use of SaveOriginalLocation and RestoreOriginalLocation.

Visual BasicCopy Code
Public Sub AnnObject_SaveOriginalLocation(ByVal obj As AnnObject)
   ' Save the original location
   obj.SaveOriginalLocation()
   ' Make some changes 
   ' i.e. shift to right 100 pixels
   obj.Translate(100, 0)

   ' Restore original location
   ' Comment out the line below, to see the object shifts
   ' Leave the line below to see the object reverts to original location
   obj.RestoreOriginalLocation()
End Sub
C#Copy Code
public void AnnObject_SaveOriginalLocation(AnnObject obj)
{
   // Save the original location
   obj.SaveOriginalLocation();
   // Make some changes 
   // i.e. shift to right 100 pixels
   obj.Translate(100, 0);

   // Restore original location
   // Comment out the line below, to see the object shifts
   // Leave the line below to see the object reverts to original location
   obj.RestoreOriginalLocation();
}
SilverlightCSharpCopy Code
public void AnnObject_SaveOriginalLocation(AnnObject obj)
{
   // Save the original location
   obj.SaveOriginalLocation();
   // Make some changes 
   // i.e. shift to right 100 pixels
   obj.Translate(100, 0);

   // Restore original location
   // Comment out the line below, to see the object shifts
   // Leave the line below to see the object reverts to original location
   obj.RestoreOriginalLocation();
}
SilverlightVBCopy Code
Public Sub AnnObject_SaveOriginalLocation(ByVal obj As AnnObject)
   ' Save the original location
   obj.SaveOriginalLocation()
   ' Make some changes 
   ' i.e. shift to right 100 pixels
   obj.Translate(100, 0)

   ' Restore original location
   ' Comment out the line below, to see the object shifts
   ' Leave the line below to see the object reverts to original location
   obj.RestoreOriginalLocation()
End Sub

Remarks

Saves location information for an AnnObject including RotateCenter location and RotateGripper location. The information can be restored using RestoreOriginalLocation.

Notes to overriders: save any acutal points that define your object. and WPF Annotation Rotation Options.

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

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