ClassRadDiagramToolbox
Represents a toolbox control that provides a collection of diagram shapes and tools for creating diagram elements through drag-and-drop operations.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
[TelerikToolboxCategory("Diagram")]
public class RadDiagramToolbox : RadListView, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, IFilterable
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadListViewRadDiagramToolbox
Implements:
Inherited Members
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
[Browsable(true)]
public override bool AllowDragDrop { get; set; }
Property Value
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
Overrides
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
[Browsable(true)]
public override bool AllowEdit { get; set; }
Property Value
Overrides
DefaultSize
Gets the default size of the diagram toolbox control.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
EnableCustomGrouping
Gets or sets a value indicating whether custom grouping of diagram shapes is enabled in the toolbox.
Declaration
[Browsable(true)]
public override bool EnableCustomGrouping { get; set; }
Property Value
Overrides
FullRowSelect
Gets or sets a value indicating whether the full row of diagram shape items should be selected in the toolbox.
Declaration
[Browsable(true)]
public override bool FullRowSelect { get; set; }
Property Value
Overrides
GroupIndent
Gets or sets the indentation of diagram shape items when they are displayed within groups in the toolbox.
Declaration
[Browsable(true)]
public override int GroupIndent { get; set; }
Property Value
Overrides
Groups
This property is not relevant for this class.
Declaration
[Browsable(false)]
public override ListViewDataItemGroupCollection Groups { get; }
Property Value
Overrides
ItemSize
Gets or sets the default size for diagram shape items displayed in the toolbox.
Declaration
[Browsable(true)]
public override Size ItemSize { get; set; }
Property Value
Overrides
ItemSpacing
Gets or sets the spacing between diagram shape items in the toolbox layout.
Declaration
[Browsable(true)]
public override int ItemSpacing { get; set; }
Property Value
Overrides
Items
This property is not relevant for this class.
Declaration
[Browsable(false)]
public ListViewDataItemCollection Items { get; }
Property Value
ShowGroups
Gets or sets a value indicating whether diagram shape items should be organized and displayed in groups within the toolbox.
Declaration
[Browsable(true)]
public override bool ShowGroups { get; set; }
Property Value
Overrides
ThemeClassName
Gets the theme class name for the toolbox control.
Declaration
public override string ThemeClassName { get; }
Property Value
Overrides
ViewType
Gets or sets the visual representation type for displaying diagram shapes in the toolbox.
Declaration
[Browsable(true)]
public override ListViewType ViewType { get; set; }
Property Value
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
e
The preview drag start event arguments containing information about the dragged item.
Returns
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
sender
The source of the event.
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
sender
The source of the event.
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
sender
The source of the event.
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
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
sender
The source of the event.
e
ListViewVisualItemCreatingEventArgs
The event arguments containing visual item creation information.