LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly)
LEAD Technologies, Inc

FindObject Method

Example 





The ID of the AnnAutomationObject to find
Finds the AnnAutomationObject associated with a certain ID. .NET support Silverlight support
Syntax
public AnnAutomationObject FindObject( 
   int id
)
'Declaration
 
Public Function FindObject( _
   ByVal id As Integer _
) As AnnAutomationObject
'Usage
 
Dim instance As AnnAutomationManager
Dim id As Integer
Dim value As AnnAutomationObject
 
value = instance.FindObject(id)
public AnnAutomationObject FindObject( 
   int id
)
 function Leadtools.Windows.Annotations.AnnAutomationManager.FindObject( 
   id 
)
public:
AnnAutomationObject^ FindObject( 
   int id
) 

Parameters

id
The ID of the AnnAutomationObject to find

Return Value

The AnnAutomationObject from Objects for this ID if found; null (Nothing in Visual Basic) otherwise.
Remarks
This method enumerates all of the AnnAutomationObject items in the Objects collection and compares AnnAutomationObject.Id with id.
Example
Copy CodeCopy Code  
Private Sub AnnAutomationManager_FindObject(ByVal manager As AnnAutomationManager)
   ' fine the line automation object
   Dim autObj As AnnAutomationObject = manager.FindObject(AnnAutomationManager.LineObjectId)
   If Not autObj Is Nothing Then
      autObj.Object.Stroke = Colors.Blue
      autObj.Object.StrokeThickness = 2.0
   End If
End Sub
private void AnnAutomationManager_FindObject(AnnAutomationManager manager)
{
   // fine the line automation object
   AnnAutomationObject autObj = manager.FindObject(AnnAutomationManager.LineObjectId);
   if(autObj != null)
   {
      autObj.Object.Stroke = Colors.Blue;
      autObj.Object.StrokeThickness = 2.0;
   }
}
private void AnnAutomationManager_FindObject(AnnAutomationManager manager)
{
   // fine the line automation object
   AnnAutomationObject autObj = manager.FindObject(AnnAutomationManager.LineObjectId);
   if(autObj != null)
   {
      autObj.Object.Stroke = Colors.Blue;
      autObj.Object.StrokeThickness = 2.0;
   }
}
Private Sub AnnAutomationManager_FindObject(ByVal manager As AnnAutomationManager)
   ' fine the line automation object
   Dim autObj As AnnAutomationObject = manager.FindObject(AnnAutomationManager.LineObjectId)
   If Not autObj Is Nothing Then
      autObj.Object.Stroke = Colors.Blue
      autObj.Object.StrokeThickness = 2.0
   End If
End Sub
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

AnnAutomationManager Class
AnnAutomationManager Members

 

 


Products | Support | Contact Us | Copyright Notices

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