ClassSelectionService
Manages the selection of diagram entities.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public class SelectionService : ISelectionService<IDiagramItem>
Inheritance: objectSelectionService
Implements:
Constructors
SelectionService()
Initializes a new instance of the SelectionService class.
Declaration
public SelectionService()
Properties
SelectedConnections
Gets the selected connections.
Declaration
public IEnumerable<IConnection> SelectedConnections { get; }
Property Value
The selected connections.
Implements
SelectedItems
Gets the currently selected diagram entities.
Declaration
public IEnumerable<IDiagramItem> SelectedItems { get; }
Property Value
Implements
SelectedItemsCount
Gets the selected items count.
SelectedShapes
Gets the currently selected diagram shapes.
Declaration
public IEnumerable<IShape> SelectedShapes { get; }
Property Value
Implements
Methods
ClearSelection()
Clears the selection.
Declaration
public virtual void ClearSelection()
Implements
DeselectItem(IDiagramItem)
Deselects the item.
Declaration
public virtual void DeselectItem(IDiagramItem item)
Parameters
item
The item.
Implements
DeselectItems(IEnumerable<IDiagramItem>)
Deselects the items.
Declaration
public virtual void DeselectItems(IEnumerable<IDiagramItem> items)
Parameters
items
The items.
Implements
GetSelectionBounds(bool, bool)
Recalculates the selection bounding box.
IsSingleSelected(IDiagramItem)
Determines whether [is single selected] [the specified item].
Declaration
public bool IsSingleSelected(IDiagramItem item)
Parameters
item
The item.
Returns
true if [is single selected] [the specified item]; otherwise, false.
Implements
SelectItem(IDiagramItem, bool)
Selects the given item.
Declaration
public virtual void SelectItem(IDiagramItem item, bool addToExistingSelection = false)
Parameters
item
The item.
addToExistingSelection
If set to true the current selection will be expanded with the given items.
Implements
SelectItems(IEnumerable<IDiagramItem>, bool)
Selects the given items.
Declaration
public virtual void SelectItems(IEnumerable<IDiagramItem> items, bool addToExistingSelection = false)
Parameters
items
The items to select.
addToExistingSelection
If set to true the current selection will be expanded with the given items.
Implements
SelectNextItem(IList<IDiagramItem>, bool)
Selects the next item in an ordered collection based on the current selected items.
Declaration
public void SelectNextItem(IList<IDiagramItem> orderedItems, bool moveBackward)
Parameters
orderedItems
moveBackward
Implements
SyncSelectedItems(IDiagramItem)
Syncs the selected items.
Declaration
public bool SyncSelectedItems(IDiagramItem model)
Parameters
model
The model.
Returns
True if item is added or removed from selectedItems, otherwise false.
Implements
Events
PreviewSelectionChanged
Occurs when [selection starts].
Declaration
public event EventHandler<DiagramSelectionChangedEventArgs> PreviewSelectionChanged
Event Value
Implements
SelectionChanged
Occurs when [selection ended].
Declaration
public event EventHandler<DiagramSelectionChangedEventArgs> SelectionChanged
Event Value
Implements