The FindObject Method supports WPF/Silverlight.
The FindObject Method is available in LEADTOOLS Document and Medical Imaging toolkits.
- id
- The ID of the AnnAutomationObject to find
Visual Basic (Declaration) | |
---|---|
Public Function FindObject( _ ByVal id As Integer _ ) As AnnAutomationObject |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As AnnAutomationManager Dim id As Integer Dim value As AnnAutomationObject value = instance.FindObject(id) |
C# | |
---|---|
public AnnAutomationObject FindObject( int id ) |
C++/CLI | |
---|---|
public: AnnAutomationObject^ FindObject( int id ) |
Parameters
- id
- The ID of the AnnAutomationObject to find
Return Value
The AnnAutomationObject from AnnAutomationManager.Objects for this ID if found; null (Nothing in Visual Basic) otherwise.This example changes the line color of new line automation objects to blue.
Visual Basic | Copy 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 |
C# | Copy Code |
---|---|
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; } } |
SilverlightCSharp | Copy Code |
---|---|
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; } } |
SilverlightVB | Copy 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 |
This method enumerates all of the AnnAutomationObject items in the AnnAutomationManager.Objects collection and compares AnnAutomationObject.Id with id.
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)