Gets the current
AnnObjectBase being edited.
Syntax
Visual Basic (Declaration) | |
---|
Public ReadOnly Property CurrentEditObject As AnnObjectBase |
XAML Syntax | |
---|
You cannot use this property in XAML. |
XAML Syntax | |
---|
You cannot use this property in XAML. |
Return Value
The current
AnnObjectBase being edited; null (Nothing in Visual Basic) if no objects are currently being edited.
Example
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)
If Not automation.CurrentEditObject Is Nothing Then
If automation.CurrentEditObject.SupportsStroke Then
automation.BeginUndo()
automation.CurrentEditObject.Stroke = Brushes.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 = Brushes.Blue; automation.CurrentEditObject.StrokeThickness = 2.0; automation.EndUndo(); } } } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family
See Also