New to Telerik UI for WinFormsStart a free 30-day trial

The service supporting the selection process of diagram items.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Type Parameters:

T

The type of Selection service.

Syntax:

C#
public interface ISelectionService<T>

Derived Classes: SelectionService

Properties

Gets the selected connections.

C#
IEnumerable<IConnection> SelectedConnections { get; }
Property Value:

The selected connections.

SelectedItems

IEnumerable<T>

Gets the selected items.

C#
IEnumerable<T> SelectedItems { get; }

Gets the selected items count.

C#
int SelectedItemsCount { get; }

Gets the currently selected diagram shapes.

C#
IEnumerable<IShape> SelectedShapes { get; }

Methods

Clears the selection.

C#
void ClearSelection()

Deselects the item.

C#
void DeselectItem(T item)
Parameters:itemT

The item.

Deselects the items.

C#
void DeselectItems(IEnumerable<T> items)
Parameters:itemsIEnumerable<T>

The items.

Recalculates the selection bounding box.

C#
Rect GetSelectionBounds(bool isGraphVirtualized = false, bool actualBounds = false)
Parameters:isGraphVirtualizedboolactualBoundsboolReturns:

Rect

Determines whether [is single selected] [the specified item].

C#
bool IsSingleSelected(T item)
Parameters:itemT

The item.

Returns:

bool

true if [is single selected] [the specified item]; otherwise, false.

Selects the item.

C#
void SelectItem(T item, bool addToExistingSelection = false)
Parameters:itemT

The item.

addToExistingSelectionbool

If set to true [add to existing selection].

Selects the items.

C#
void SelectItems(IEnumerable<T> items, bool addToExistingSelection = false)
Parameters:itemsIEnumerable<T>

The items.

addToExistingSelectionbool

The add to existing selection flag.

Selects the next item in an ordered collection based on the current selected items.

C#
void SelectNextItem(IList<T> orderedItems, bool moveBackward)
Parameters:orderedItemsIList<T>moveBackwardbool

Syncs the selected items.

C#
bool SyncSelectedItems(T model)
Parameters:modelT

The model.

Returns:

bool

True if item is added or removed from selectedItems, otherwise false.

Events

Occurs when [selection starts].

C#
event EventHandler<DiagramSelectionChangedEventArgs> PreviewSelectionChanged

Occurs when [selection ended].

C#
event EventHandler<DiagramSelectionChangedEventArgs> SelectionChanged