Class RadDiagramToolbox
Represents a toolbox control that provides a collection of diagram shapes and tools for creating diagram elements through drag-and-drop operations.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.RadDiagram.dll
Syntax
[TelerikToolboxCategory("Diagram")]
public class RadDiagramToolbox : RadListView, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, IFilterable
Constructors
RadDiagramToolbox()
Initializes a new instance of the RadDiagramToolbox class with default settings and predefined diagram shapes.
Declaration
public RadDiagramToolbox()
Properties
AllowDragDrop
Gets or sets a value indicating whether drag-and-drop operations are enabled for reordering diagram shapes within the toolbox.
Declaration
public override bool AllowDragDrop { get; set; }
Property Value
System.Boolean
|
Overrides
AllowDrop
Gets or sets a value indicating whether the toolbox can accept diagram shapes that are dragged onto it from external sources.
Declaration
public override bool AllowDrop { get; set; }
Property Value
System.Boolean
|
Remarks
Returns: true if drag-and-drop operations are allowed in the control; otherwise, false. The default is false.
AllowEdit
Gets or sets a value indicating whether editing of diagram shape items in the toolbox is enabled.
Declaration
public override bool AllowEdit { get; set; }
Property Value
System.Boolean
|
Overrides
DefaultSize
Gets the default size of the diagram toolbox control.
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
Overrides
EnableCustomGrouping
Gets or sets a value indicating whether custom grouping of diagram shapes is enabled in the toolbox.
Declaration
public override bool EnableCustomGrouping { get; set; }
Property Value
System.Boolean
|
Overrides
FullRowSelect
Gets or sets a value indicating whether the full row of diagram shape items should be selected in the toolbox.
Declaration
public override bool FullRowSelect { get; set; }
Property Value
System.Boolean
|
Overrides
GroupIndent
Gets or sets the indentation of diagram shape items when they are displayed within groups in the toolbox.
Declaration
public override int GroupIndent { get; set; }
Property Value
System.Int32
|
Overrides
Groups
This property is not relevant for this class.
Declaration
public override ListViewDataItemGroupCollection Groups { get; }
Property Value
ListViewDataItemGroupCollection
|
Overrides
Items
This property is not relevant for this class.
Declaration
public ListViewDataItemCollection Items { get; }
Property Value
ListViewDataItemCollection
|
ItemSize
Gets or sets the default size for diagram shape items displayed in the toolbox.
Declaration
public override Size ItemSize { get; set; }
Property Value
System.Drawing.Size
|
Overrides
ItemSpacing
Gets or sets the spacing between diagram shape items in the toolbox layout.
Declaration
public override int ItemSpacing { get; set; }
Property Value
System.Int32
|
Overrides
ShowGroups
Gets or sets a value indicating whether diagram shape items should be organized and displayed in groups within the toolbox.
Declaration
public override bool ShowGroups { get; set; }
Property Value
System.Boolean
|
Overrides
ThemeClassName
Gets the theme class name for the toolbox control.
Declaration
public override string ThemeClassName { get; }
Property Value
System.String
|
Overrides
ViewType
Gets or sets the visual representation type for displaying diagram shapes in the toolbox.
Declaration
public override ListViewType ViewType { get; set; }
Property Value
ListViewType
|
Overrides
Methods
CreateDataItems()
Creates and initializes the default collection of diagram shape items organized into predefined groups for the toolbox.
Declaration
protected virtual void CreateDataItems()
CreateDiagramShape(PreviewDragStartEventArgs)
Creates a diagram shape instance based on the drag start event arguments for drag-and-drop operations.
Declaration
protected virtual RadDiagramShape CreateDiagramShape(PreviewDragStartEventArgs e)
Parameters
PreviewDragStartEventArgs
e
The preview drag start event arguments containing information about the dragged item. |
Returns
RadDiagramShape
A RadDiagramShape instance or null if no shape should be created. |
DragDropService_PreviewDragDrop(Object, RadDropEventArgs)
Handles the preview drag drop event to finalize the creation and placement of diagram shapes onto the target diagram.
Declaration
protected virtual void DragDropService_PreviewDragDrop(object sender, RadDropEventArgs e)
Parameters
System.Object
sender
The source of the event. |
RadDropEventArgs
e
The drop event arguments containing drop location and target information. |
DragDropService_PreviewDragOver(Object, RadDragOverEventArgs)
Handles the preview drag over event to determine whether the current drag target can accept the dragged diagram shape.
Declaration
protected virtual void DragDropService_PreviewDragOver(object sender, RadDragOverEventArgs e)
Parameters
System.Object
sender
The source of the event. |
RadDragOverEventArgs
e
The drag over event arguments containing hit target and drag operation information. |
DragDropService_PreviewDragStart(Object, PreviewDragStartEventArgs)
Handles the preview drag start event to initiate drag-and-drop operations for diagram shapes from the toolbox.
Declaration
protected virtual void DragDropService_PreviewDragStart(object sender, PreviewDragStartEventArgs e)
Parameters
System.Object
sender
The source of the event. |
PreviewDragStartEventArgs
e
The preview drag start event arguments containing drag operation details. |
PreviewDragDropCore(PreviewDragStartEventArgs)
Performs the core logic for processing drag-and-drop operations when dragging diagram shapes from the toolbox.
Declaration
protected virtual void PreviewDragDropCore(PreviewDragStartEventArgs e)
Parameters
PreviewDragStartEventArgs
e
The preview drag start event arguments containing information about the dragged shape. |
RadDiagramToolbox_VisualItemCreating(Object, ListViewVisualItemCreatingEventArgs)
Handles the visual item creation event to customize the appearance of diagram shape items in the toolbox.
Declaration
protected virtual void RadDiagramToolbox_VisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e)
Parameters
System.Object
sender
The source of the event. |
ListViewVisualItemCreatingEventArgs
e
The event arguments containing visual item creation information. |