Error processing SSI file
LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly)

Show in webframe

CanSelectAll Property






Gets a value indicating whether this AnnAutomation is in a state where all objects can be selected.
Syntax
public virtual bool CanSelectAll {get;}
'Declaration
 
Public Overridable ReadOnly Property CanSelectAll As Boolean
'Usage
 
Dim instance As AnnAutomation
Dim value As Boolean
 
value = instance.CanSelectAll

            

            
public:
virtual property bool CanSelectAll {
   bool get();
}

Property Value

true if all objects in this AnnAutomation can be selected; otherwise, false.
Remarks
If the AnnAutomation contains one or more AnnObject objects, then this property will return true. Selecting an object in AnnAutomation is the equivalent of starting its AnnEditDesigner.

Call the SelectAll method to select all of the automation objects.

For information about grouping and ungrouping, refer to Grouping and Ungrouping WPF Annotation Objects.

Example

This example adds a few objects into an automation and then selects and deselects them.

Copy Code  
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations

Private Sub AnnAutomation_CanSelectAll(ByVal automation As AnnAutomation)
   ' 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
   Dim rectObj As AnnRectangleObject = New AnnRectangleObject()
   rectObj.Rect = New Rect(100, 100, 100, 100)

   rectObj.Stroke = Colors.Blue
   rectObj.StrokeThickness = 1.0
   rectObj.Fill = Nothing
   automation.Container.Children.Add(rectObj)

   Dim lineObj As AnnLineObject = New AnnLineObject()
   lineObj.Start = New Point(100, 100)
   lineObj.End = New Point(200, 200)

   lineObj.Stroke = Colors.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 Then
      automation.SelectAll()
      MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
   End If

   ' deselect all the objects
   If automation.CanSelectNone Then
      automation.SelectNone()
      MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
   End If
End Sub
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Demos;
using Leadtools.Help;

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.Rect = new Rect(100, 100, 100, 100);
   rectObj.Stroke = Colors.Blue;
   rectObj.Fill = Colors.Transparent;
   rectObj.StrokeThickness = 1.0;
   automation.Container.Children.Add(rectObj);

   AnnLineObject lineObj = new AnnLineObject();
   lineObj.Start = new Point(100, 100);
   lineObj.End = new Point(200, 200);
   lineObj.Stroke = Colors.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));
   }
}
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Examples;
using Leadtools.Silverlight.Demos;

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.Rect = new Rect(100, 100, 100, 100);
   rectObj.Stroke = Colors.Blue;
   rectObj.Fill = Colors.Transparent;
   rectObj.StrokeThickness = 1.0;
   automation.Container.Children.Add(rectObj);

   AnnLineObject lineObj = new AnnLineObject();
   lineObj.Start = new Point(100, 100);
   lineObj.End = new Point(200, 200);
   lineObj.Stroke = Colors.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));
   }
}
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations
Imports Leadtools.Silverlight.Demos

Private Sub AnnAutomation_CanSelectAll(ByVal automation As AnnAutomation)
   ' 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
   Dim rectObj As AnnRectangleObject = New AnnRectangleObject()
   rectObj.Rect = New Rect(100, 100, 100, 100)
   rectObj.Stroke = Colors.Blue
   rectObj.Fill = Colors.Transparent
   rectObj.StrokeThickness = 1.0
   automation.Container.Children.Add(rectObj)

   Dim lineObj As AnnLineObject = New AnnLineObject()
   lineObj.Start = New Point(100, 100)
   lineObj.End = New Point(200, 200)
   lineObj.Stroke = Colors.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 Then
      automation.SelectAll()
      MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
   End If

   ' deselect all the objects
   If automation.CanSelectNone Then
      automation.SelectNone()
      MessageBox.Show(String.Format("CanSelectAll = {0}, CanSelectNone = {1}", automation.CanSelectAll, automation.CanSelectNone))
   End If
End Sub
Requirements

Target Platforms

See Also

Reference

AnnAutomation Class
AnnAutomation Members

Error processing SSI file
   Leadtools.Windows.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features