Class SelectionService
Manages the selection of diagram entities.
Inheritance
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public class SelectionService : Object, ISelectionService<IDiagramItem>
Constructors
SelectionService()
Properties
SelectedConnections
Gets the selected connections.
Declaration
public IEnumerable<IConnection> SelectedConnections { get; }
Property Value
System.Collections.Generic.IEnumerable<IConnection>
The selected connections. |
Implements
SelectedItems
Gets the currently selected diagram entities.
Declaration
public IEnumerable<IDiagramItem> SelectedItems { get; }
Property Value
System.Collections.Generic.IEnumerable<IDiagramItem>
|
Implements
SelectedItemsCount
Gets the selected items count.
Declaration
public int SelectedItemsCount { get; }
Property Value
System.Int32
|
Implements
SelectedShapes
Gets the currently selected diagram shapes.
Declaration
public IEnumerable<IShape> SelectedShapes { get; }
Property Value
System.Collections.Generic.IEnumerable<IShape>
|
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
IDiagramItem
item
The item. |
Implements
DeselectItems(IEnumerable<IDiagramItem>)
Deselects the items.
Declaration
public virtual void DeselectItems(IEnumerable<IDiagramItem> items)
Parameters
System.Collections.Generic.IEnumerable<IDiagramItem>
items
The items. |
Implements
GetSelectionBounds(Boolean, Boolean)
Recalculates the selection bounding box.
Declaration
public Rect GetSelectionBounds(bool isGraphVirtualized = false, bool actualBounds = false)
Parameters
System.Boolean
isGraphVirtualized
|
System.Boolean
actualBounds
|
Returns
System.Windows.Rect
|
Implements
IsSingleSelected(IDiagramItem)
Determines whether [is single selected] [the specified item].
Declaration
public bool IsSingleSelected(IDiagramItem item)
Parameters
IDiagramItem
item
The item. |
Returns
System.Boolean
|
Implements
SelectItem(IDiagramItem, Boolean)
Selects the given item.
Declaration
public virtual void SelectItem(IDiagramItem item, bool addToExistingSelection = false)
Parameters
IDiagramItem
item
The item. |
System.Boolean
addToExistingSelection
If set to |
Implements
SelectItems(IEnumerable<IDiagramItem>, Boolean)
Selects the given items.
Declaration
public virtual void SelectItems(IEnumerable<IDiagramItem> items, bool addToExistingSelection = false)
Parameters
System.Collections.Generic.IEnumerable<IDiagramItem>
items
The items to select. |
System.Boolean
addToExistingSelection
If set to |
Implements
SelectNextItem(IList<IDiagramItem>, Boolean)
Selects the next item in an ordered collection based on the current selected items.
Declaration
public void SelectNextItem(IList<IDiagramItem> orderedItems, bool moveBackward)
Parameters
System.Collections.Generic.IList<IDiagramItem>
orderedItems
|
System.Boolean
moveBackward
|
Implements
SyncSelectedItems(IDiagramItem)
Syncs the selected items.
Declaration
public bool SyncSelectedItems(IDiagramItem model)
Parameters
IDiagramItem
model
The model. |
Returns
System.Boolean
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 Type
System.EventHandler<DiagramSelectionChangedEventArgs>
|
Implements
SelectionChanged
Occurs when [selection ended].
Declaration
public event EventHandler<DiagramSelectionChangedEventArgs> SelectionChanged
Event Type
System.EventHandler<DiagramSelectionChangedEventArgs>
|