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;} |
C++/CLI | |
---|
public:
virtual property bool CanSelectAll {
bool get();
} |
XAML Syntax | |
---|
You cannot use this property in XAML. |
XAML Syntax | |
---|
You cannot use this property in XAML. |
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 |
---|
Private Sub AnnAutomation_CanSelectAll(ByVal automation As AnnAutomation)
automation.Container.Children.Clear()
MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
Dim rectObj As AnnRectangleObject = New AnnRectangleObject()
rectObj.Left = 100
rectObj.Top = 100
rectObj.Width = 100
rectObj.Height = 100
rectObj.Stroke = Brushes.Blue
rectObj.StrokeThickness = 1.0
rectObj.Fill = Nothing
automation.Container.Children.Add(rectObj)
Dim lineObj As AnnLineObject = New AnnLineObject()
lineObj.X1 = 100
lineObj.Y1 = 100
lineObj.X2 = 200
lineObj.Y2 = 200
lineObj.Stroke = Brushes.Red
lineObj.StrokeThickness = 1.0
automation.Container.Children.Add(lineObj)
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 |
---|
private void AnnAutomation_CanSelectAll(AnnAutomation automation) { // first make sure no objects are in this automation container automation.Container.Children.Clear(); MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone)); // add two objects to the automation AnnRectangleObject rectObj = new AnnRectangleObject(); rectObj.Left = 100; rectObj.Top = 100; rectObj.Width = 100; rectObj.Height = 100; rectObj.Stroke = Brushes.Blue; rectObj.StrokeThickness = 1.0; rectObj.Fill = null; automation.Container.Children.Add(rectObj); AnnLineObject lineObj = new AnnLineObject(); lineObj.X1 = 100; lineObj.Y1 = 100; lineObj.X2 = 200; lineObj.Y2 = 200; lineObj.Stroke = Brushes.Red; lineObj.StrokeThickness = 1.0; automation.Container.Children.Add(lineObj); 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 3.0, Windows XP, Windows Vista, and Windows Server 2003 family
See Also