The CurrentEditObject Property supports WPF/Silverlight.
The CurrentEditObject Property is available in LEADTOOLS Document and Medical Imaging toolkits.
Gets the current AnnObject being edited. Supported in Silverlight, Windows Phone 7Visual Basic (Declaration) | |
---|---|
Public ReadOnly Property CurrentEditObject As AnnObject |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As AnnAutomation Dim value As AnnObject value = instance.CurrentEditObject |
C# | |
---|---|
public AnnObject CurrentEditObject {get;} |
C++/CLI | |
---|---|
public: property AnnObject^ CurrentEditObject { AnnObject^ get(); } |
Property Value
The current AnnObject being edited; null (Nothing in Visual Basic) if no objects are currently being edited.This example changes the stroke of the object that is currently being edited to a Red pen that has a width of 2 pixels.
Visual Basic | Copy Code |
---|---|
Private Sub AnnAutomation_ChangeStrokeToBlue(ByVal automation As AnnAutomation) ' check if an object is currently "selected" If Not automation.CurrentEditObject Is Nothing Then ' check if this object supports a pen If automation.CurrentEditObject.SupportsStroke Then ' change its pen automation.BeginUndo() automation.CurrentEditObject.Stroke = Colors.Blue automation.CurrentEditObject.StrokeThickness = 2.0 automation.EndUndo() End If End If End Sub |
C# | Copy Code |
---|---|
private void AnnAutomation_ChangeStrokeToBlue(AnnAutomation automation) { // check if an object is currently "selected" if(automation.CurrentEditObject != null) { // check if this object supports a pen if(automation.CurrentEditObject.SupportsStroke) { // change its pen automation.BeginUndo(); automation.CurrentEditObject.Stroke = Colors.Blue; automation.CurrentEditObject.StrokeThickness = 2.0; automation.EndUndo(); } } } |
SilverlightCSharp | Copy Code |
---|---|
private void AnnAutomation_ChangeStrokeToBlue(AnnAutomation automation) { // check if an object is currently "selected" if(automation.CurrentEditObject != null) { // check if this object supports a pen if(automation.CurrentEditObject.SupportsStroke) { // change its pen automation.BeginUndo(); automation.CurrentEditObject.Stroke = Colors.Blue; automation.CurrentEditObject.StrokeThickness = 2.0; automation.EndUndo(); } } } |
SilverlightVB | Copy Code |
---|---|
Private Sub AnnAutomation_ChangeStrokeToBlue(ByVal automation As AnnAutomation) ' check if an object is currently "selected" If Not automation.CurrentEditObject Is Nothing Then ' check if this object supports a pen If automation.CurrentEditObject.SupportsStroke Then ' change its pen automation.BeginUndo() automation.CurrentEditObject.Stroke = Colors.Blue automation.CurrentEditObject.StrokeThickness = 2.0 automation.EndUndo() End If End If End Sub |
(Read only) The current object being edited is the AnnObject currently "selected" where its AnnEditDesigner is currently active.
This is the object that will be processed when calling any of the object processing methods of this AnnAutomation. For example, calling Copy will copy the CurrentEditObject into the clipboard.
You can change the CurrentEditObject by calling StartEditing.
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)