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) | ![]() |
---|---|
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 | ![]() |
---|---|
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# | ![]() |
---|---|
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 | ![]() |
---|---|
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 | ![]() |
---|---|
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)