Gets a value indicating whether this
AnnAutomation is in a state where all objects can be selected.
Syntax
Visual Basic (Declaration) | |
---|
Public Overridable ReadOnly Property CanSelectAll As Boolean |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As AnnAutomation
Dim value As Boolean
value = instance.CanSelectAll
|
C# | |
---|
public virtual bool CanSelectAll {get;} |
Managed Extensions for C++ | |
---|
public: __property virtual bool get_CanSelectAll(); |
C++/CLI | |
---|
public:
virtual property bool CanSelectAll {
bool get();
} |
Return Value
true if all objects in this
AnnAutomation can be selected; otherwise, false.
Example
This example adds a few objects into an automation and then selects and deselects them.
Visual Basic | Copy Code |
---|
Public Sub AnnAutomation_CanSelectAll(ByVal automation As AnnAutomation)
automation.Container.Objects.Clear()
automation.Viewer.Invalidate()
MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
Dim rectObj As AnnRectangleObject = New AnnRectangleObject()
rectObj.Bounds = New AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel)
rectObj.Pen = New AnnPen(Color.Blue, New AnnLength(1, AnnUnit.Pixel))
rectObj.Brush = Nothing
automation.Container.Objects.Add(rectObj)
automation.Viewer.Invalidate(rectObj.InvalidRectangle)
Dim lineObj As AnnLineObject = New AnnLineObject()
lineObj.StartPoint = New AnnPoint(100, 100, AnnUnit.Pixel)
lineObj.EndPoint = New AnnPoint(200, 200, AnnUnit.Pixel)
lineObj.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))
automation.Container.Objects.Add(lineObj)
automation.Viewer.Invalidate(lineObj.InvalidRectangle)
MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
If automation.CanSelectAll Then
automation.SelectAll()
MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
End If
If automation.CanSelectNone Then
automation.SelectNone()
MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
End If
End Sub |
C# | Copy Code |
---|
public void AnnAutomation_CanSelectAll(AnnAutomation automation) { // first make sure no objects are in this automation container automation.Container.Objects.Clear(); automation.Viewer.Invalidate(); MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone)); // add two objects to the automation AnnRectangleObject rectObj = new AnnRectangleObject(); rectObj.Bounds = new AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel); rectObj.Pen = new AnnPen(Color.Blue, new AnnLength(1, AnnUnit.Pixel)); rectObj.Brush = null; automation.Container.Objects.Add(rectObj); automation.Viewer.Invalidate(rectObj.InvalidRectangle); AnnLineObject lineObj = new AnnLineObject(); lineObj.StartPoint = new AnnPoint(100, 100, AnnUnit.Pixel); lineObj.EndPoint = new AnnPoint(200, 200, AnnUnit.Pixel); lineObj.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel)); automation.Container.Objects.Add(lineObj); automation.Viewer.Invalidate(lineObj.InvalidRectangle); MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone)); // select all the objects if(automation.CanSelectAll) { automation.SelectAll(); MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone)); } // deselect all the objects if(automation.CanSelectNone) { automation.SelectNone(); MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone)); } } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also