Class
RadDiagram

Represents a powerful diagramming control that allows visualization and editing of diagrams, flowcharts, organizational charts, and other visual graph structures. Provides functionality for creating, connecting, and manipulating shapes within a canvas.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Diagram")]
[ComplexBindingProperties("DataSource")]
public class RadDiagram : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, IPrintable

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadDiagram

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetILayoutHandlerINotifyPropertyChangedIPrintableISupportInitializeISupportInitializeNotificationISynchronizeInvokeIWin32Window

Inherited Members RadControl.isResizing2RadControl.isDisposing2RadControl.invalidResizeRectRadControl.isAccessibilityRequestedRadControl.Dispose(bool)RadControl.Construct()RadControl.CreateBehavior()RadControl.CreateRootElement()RadControl.InitializeRootElement(RootRadElement)RadControl.LoadElementTree()RadControl.LoadElementTree(Size)RadControl.SetBackColorThemeOverrides()RadControl.ResetBackColorThemeOverrides()RadControl.SetForeColorThemeOverrides()RadControl.ResetForeColorThemeOverrides()RadControl.OnKeyUp(KeyEventArgs)RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)RadControl.OnKeyPress(KeyPressEventArgs)RadControl.OnClick(EventArgs)RadControl.OnDoubleClick(EventArgs)RadControl.OnMouseEnter(EventArgs)RadControl.OnMouseLeave(EventArgs)RadControl.OnMouseHover(EventArgs)RadControl.OnMouseWheel(MouseEventArgs)RadControl.OnMouseCaptureChanged(EventArgs)RadControl.OnGotFocus(EventArgs)RadControl.OnLostFocus(EventArgs)RadControl.OnCreateControl()RadControl.OnHandleDestroyed(EventArgs)RadControl.OnParentChanged(EventArgs)RadControl.OnFontChanged(EventArgs)RadControl.OnForeColorChanged(EventArgs)RadControl.OnBackColorChanged(EventArgs)RadControl.OnEnabledChanged(EventArgs)RadControl.OnLocationChanged(EventArgs)RadControl.OnPaddingChanged(EventArgs)RadControl.OnRightToLeftChanged(EventArgs)RadControl.OnPaint(PaintEventArgs)RadControl.OnLayout(LayoutEventArgs)RadControl.OnAutoSizeChanged(EventArgs)RadControl.WndProc(ref Message)RadControl.OnInvalidated(RadElement)RadControl.OnLoad(Size)RadControl.OnCaptureLosing()RadControl.OnThemeChanged()RadControl.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadControl.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)RadControl.ProcessMnemonic(char)RadControl.ProcessFocusRequested(RadElement)RadControl.ProcessCaptureChangeRequested(RadElement, bool)RadControl.GetInputElement()RadControl.OnNotifyPropertyChanged(string)RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadControl.GetPreferredSize(Size)RadControl.SetBoundsCore(int, int, int, int, BoundsSpecified)RadControl.GetRootElementDesiredSize(int, int, int, int)RadControl.OnZoomGesture(ZoomGestureEventArgs)RadControl.OnRotateGesture(RotateGestureEventArgs)RadControl.OnPanGesture(PanGestureEventArgs)RadControl.OnTwoFingerTapGesture(GestureEventArgs)RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadControl.OnGesture(GestureEventArgs)RadControl.ProcessGesture(Message)RadControl.EnableGesture(GestureType)RadControl.DisableGesture(GestureType)RadControl.Refresh()RadControl.SuspendUpdate()RadControl.ResumeUpdate()RadControl.ResumeUpdate(bool)RadControl.InvokeLayoutCallback(LayoutCallback)RadControl.RegisterHostedControl(RadHostItem)RadControl.UnregisterHostedControl(RadHostItem, bool)RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)RadControl.GetPlainText()RadControl.ShouldSerializeProperty(RadProperty)RadControl.ShouldSerializeProperty(RadProperty, RadObject)RadControl.ResetProperty(RadProperty, RadObject)RadControl.CanEditElementAtDesignTime(RadElement)RadControl.ProcessCodedUIMessage(ref IPCMessage)RadControl.FindPropertyInChildren(RadControl, IPCMessage)RadControl.ScaleControl(SizeF, BoundsSpecified)RadControl.PerformRadAutoScale(BoundsSpecified?)RadControl.GetMonitorDpiScaleFactor(Control)RadControl.SetRadAutoScale(bool)RadControl.EnableDpiScalingRadControl.EnableRadAutoScaleRadControl.EnableRadFormInitialDpiScalingRadControl.EnableImageDpiScalingRadControl.EnableSvgImagesRadControl.IsLoadedRadControl.ElementTreeRadControl.UseCompatibleTextRenderingDefaultValueRadControl.BehaviorRadControl.RootElementRadControl.PaddingRadControl.ThemeNameRadControl.TextRadControl.EnableThemingRadControl.ThemeClassNameRadControl.ImageListRadControl.ImageScalingSizeRadControl.UseCompatibleTextRenderingRadControl.AutoSizeRadControl.MaximumSizeRadControl.MinimumSizeRadControl.FocusableRadControl.SiteRadControl.CausesValidationRadControl.IsInitializingRadControl.SmallImageListRadControl.SmallImageScalingSizeRadControl.IsDesignModeRadControl.IsDisplayedRadControl.FocusedElementRadControl.AllowShowFocusCuesRadControl.ShowItemToolTipsRadControl.CommandBindingsRadControl.EnableKeyMapRadControl.BackColorRadControl.ForeColorRadControl.FontRadControl.ValidationCancelRadControl.EnableAnalyticsRadControl.AnalyticsNameRadControl.EnableRadAccessibilityObjectsRadControl.EnableCodedUITestsRadControl.EnableCodedUITestsDefaultValueRadControl.EnableUIAutomationRadControl.EnableUIAutomationDefaultValueRadControl.ElementInvalidatedRadControl.ToolTipTextNeededRadControl.ScreenTipNeededRadControl.ThemeNameChangedRadControl.InitializedRadControl.PropertyChangedRadControl.ZoomGestureRadControl.RotateGestureRadControl.PanGestureRadControl.TwoFingerTapGestureRadControl.PressAndTapGestureScrollableControl.ScrollStateAutoScrollingScrollableControl.ScrollStateHScrollVisibleScrollableControl.ScrollStateVScrollVisibleScrollableControl.ScrollStateUserHasScrolledScrollableControl.ScrollStateFullDragScrollableControl.AdjustFormScrollbars(bool)ScrollableControl.GetScrollState(int)ScrollableControl.SetDisplayRectLocation(int, int)ScrollableControl.ScrollControlIntoView(Control)ScrollableControl.ScrollToControl(Control)ScrollableControl.OnScroll(ScrollEventArgs)ScrollableControl.SetAutoScrollMargin(int, int)ScrollableControl.SetScrollState(int, bool)ScrollableControl.AutoScrollScrollableControl.AutoScrollMarginScrollableControl.AutoScrollPositionScrollableControl.AutoScrollMinSizeScrollableControl.CreateParamsScrollableControl.DisplayRectangleScrollableControl.HScrollScrollableControl.HorizontalScrollScrollableControl.VScrollScrollableControl.VerticalScrollScrollableControl.ScrollControl.GetAccessibilityObjectById(int)Control.SetAutoSizeMode(AutoSizeMode)Control.GetAutoSizeMode()Control.AccessibilityNotifyClients(AccessibleEvents, int)Control.AccessibilityNotifyClients(AccessibleEvents, int, int)Control.BeginInvoke(Delegate)Control.BeginInvoke(Delegate, params object[])Control.BringToFront()Control.Contains(Control)Control.CreateAccessibilityInstance()Control.CreateControlsInstance()Control.CreateGraphics()Control.CreateHandle()Control.CreateControl()Control.DefWndProc(ref Message)Control.DestroyHandle()Control.DoDragDrop(object, DragDropEffects)Control.DrawToBitmap(Bitmap, Rectangle)Control.EndInvoke(IAsyncResult)Control.FindForm()Control.GetTopLevel()Control.RaiseKeyEvent(object, KeyEventArgs)Control.RaiseMouseEvent(object, MouseEventArgs)Control.Focus()Control.FromChildHandle(IntPtr)Control.FromHandle(IntPtr)Control.GetChildAtPoint(Point, GetChildAtPointSkip)Control.GetChildAtPoint(Point)Control.GetContainerControl()Control.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)Control.GetNextControl(Control, bool)Control.GetStyle(ControlStyles)Control.Hide()Control.InitLayout()Control.Invalidate(Region)Control.Invalidate(Region, bool)Control.Invalidate()Control.Invalidate(bool)Control.Invalidate(Rectangle)Control.Invalidate(Rectangle, bool)Control.Invoke(Delegate)Control.Invoke(Delegate, params object[])Control.InvokePaint(Control, PaintEventArgs)Control.InvokePaintBackground(Control, PaintEventArgs)Control.IsKeyLocked(Keys)Control.IsInputChar(char)Control.IsMnemonic(char, string)Control.LogicalToDeviceUnits(int)Control.LogicalToDeviceUnits(Size)Control.ScaleBitmapLogicalToDevice(ref Bitmap)Control.NotifyInvalidate(Rectangle)Control.InvokeOnClick(Control, EventArgs)Control.OnBackgroundImageChanged(EventArgs)Control.OnBackgroundImageLayoutChanged(EventArgs)Control.OnCausesValidationChanged(EventArgs)Control.OnContextMenuChanged(EventArgs)Control.OnContextMenuStripChanged(EventArgs)Control.OnCursorChanged(EventArgs)Control.OnDockChanged(EventArgs)Control.OnNotifyMessage(Message)Control.OnParentBackColorChanged(EventArgs)Control.OnParentBackgroundImageChanged(EventArgs)Control.OnParentBindingContextChanged(EventArgs)Control.OnParentCursorChanged(EventArgs)Control.OnParentEnabledChanged(EventArgs)Control.OnParentFontChanged(EventArgs)Control.OnParentForeColorChanged(EventArgs)Control.OnParentRightToLeftChanged(EventArgs)Control.OnParentVisibleChanged(EventArgs)Control.OnPrint(PaintEventArgs)Control.OnTabIndexChanged(EventArgs)Control.OnTabStopChanged(EventArgs)Control.OnTextChanged(EventArgs)Control.OnClientSizeChanged(EventArgs)Control.OnControlAdded(ControlEventArgs)Control.OnControlRemoved(ControlEventArgs)Control.OnHandleCreated(EventArgs)Control.OnDragEnter(DragEventArgs)Control.OnDragOver(DragEventArgs)Control.OnDragLeave(EventArgs)Control.OnDragDrop(DragEventArgs)Control.OnGiveFeedback(GiveFeedbackEventArgs)Control.OnEnter(EventArgs)Control.InvokeGotFocus(Control, EventArgs)Control.OnHelpRequested(HelpEventArgs)Control.OnInvalidated(InvalidateEventArgs)Control.OnLeave(EventArgs)Control.InvokeLostFocus(Control, EventArgs)Control.OnMarginChanged(EventArgs)Control.OnMouseDoubleClick(MouseEventArgs)Control.OnMouseClick(MouseEventArgs)Control.OnDpiChangedBeforeParent(EventArgs)Control.OnDpiChangedAfterParent(EventArgs)Control.OnMove(EventArgs)Control.OnQueryContinueDrag(QueryContinueDragEventArgs)Control.OnRegionChanged(EventArgs)Control.OnResize(EventArgs)Control.OnSizeChanged(EventArgs)Control.OnChangeUICues(UICuesEventArgs)Control.OnStyleChanged(EventArgs)Control.OnSystemColorsChanged(EventArgs)Control.OnValidating(CancelEventArgs)Control.OnValidated(EventArgs)Control.RescaleConstantsForDpi(int, int)Control.PerformLayout()Control.PerformLayout(Control, string)Control.PointToClient(Point)Control.PointToScreen(Point)Control.PreProcessMessage(ref Message)Control.PreProcessControlMessage(ref Message)Control.ProcessCmdKey(ref Message, Keys)Control.ProcessDialogChar(char)Control.ProcessDialogKey(Keys)Control.ProcessKeyEventArgs(ref Message)Control.ProcessKeyMessage(ref Message)Control.ProcessKeyPreview(ref Message)Control.RaiseDragEvent(object, DragEventArgs)Control.RaisePaintEvent(object, PaintEventArgs)Control.RecreateHandle()Control.RectangleToClient(Rectangle)Control.RectangleToScreen(Rectangle)Control.ReflectMessage(IntPtr, ref Message)Control.ResetMouseEventArgs()Control.ResetText()Control.ResumeLayout()Control.ResumeLayout(bool)Control.Scale(SizeF)Control.Select()Control.Select(bool, bool)Control.SelectNextControl(Control, bool, bool, bool, bool)Control.SendToBack()Control.SetBounds(int, int, int, int)Control.SetBounds(int, int, int, int, BoundsSpecified)Control.SetClientSizeCore(int, int)Control.SizeFromClientSize(Size)Control.SetStyle(ControlStyles, bool)Control.SetTopLevel(bool)Control.SetVisibleCore(bool)Control.RtlTranslateAlignment(HorizontalAlignment)Control.RtlTranslateAlignment(LeftRightAlignment)Control.RtlTranslateAlignment(ContentAlignment)Control.RtlTranslateHorizontal(HorizontalAlignment)Control.RtlTranslateLeftRight(LeftRightAlignment)Control.RtlTranslateContent(ContentAlignment)Control.Show()Control.SuspendLayout()Control.Update()Control.UpdateBounds()Control.UpdateBounds(int, int, int, int)Control.UpdateBounds(int, int, int, int, int, int)Control.UpdateZOrder()Control.UpdateStyles()Control.OnImeModeChanged(EventArgs)Control.AccessibilityObjectControl.AccessibleDefaultActionDescriptionControl.AccessibleDescriptionControl.AccessibleNameControl.AccessibleRoleControl.AllowDropControl.AnchorControl.AutoScrollOffsetControl.LayoutEngineControl.BackgroundImageControl.BackgroundImageLayoutControl.BindingContextControl.BottomControl.BoundsControl.CanFocusControl.CanRaiseEventsControl.CanSelectControl.CaptureControl.CheckForIllegalCrossThreadCallsControl.ClientRectangleControl.ClientSizeControl.CompanyNameControl.ContainsFocusControl.ContextMenuControl.ContextMenuStripControl.ControlsControl.CreatedControl.CursorControl.DataBindingsControl.DefaultBackColorControl.DefaultCursorControl.DefaultFontControl.DefaultForeColorControl.DefaultMarginControl.DefaultMaximumSizeControl.DefaultMinimumSizeControl.DefaultPaddingControl.DeviceDpiControl.IsDisposedControl.DisposingControl.DockControl.DoubleBufferedControl.EnabledControl.FocusedControl.FontHeightControl.HandleControl.HasChildrenControl.HeightControl.IsHandleCreatedControl.InvokeRequiredControl.IsAccessibleControl.IsMirroredControl.LeftControl.LocationControl.MarginControl.ModifierKeysControl.MouseButtonsControl.MousePositionControl.NameControl.ParentControl.ProductNameControl.ProductVersionControl.RecreatingHandleControl.RegionControl.RenderRightToLeftControl.ResizeRedrawControl.RightControl.RightToLeftControl.ScaleChildrenControl.SizeControl.TabIndexControl.TabStopControl.TagControl.TopControl.TopLevelControlControl.ShowKeyboardCuesControl.ShowFocusCuesControl.UseWaitCursorControl.VisibleControl.WidthControl.PreferredSizeControl.CanEnableImeControl.DefaultImeModeControl.ImeModeControl.ImeModeBaseControl.PropagatingImeModeControl.BackColorChangedControl.BackgroundImageChangedControl.BackgroundImageLayoutChangedControl.BindingContextChangedControl.CausesValidationChangedControl.ClientSizeChangedControl.ContextMenuChangedControl.ContextMenuStripChangedControl.CursorChangedControl.DockChangedControl.EnabledChangedControl.FontChangedControl.ForeColorChangedControl.LocationChangedControl.MarginChangedControl.RegionChangedControl.RightToLeftChangedControl.SizeChangedControl.TabIndexChangedControl.TabStopChangedControl.TextChangedControl.VisibleChangedControl.ClickControl.ControlAddedControl.ControlRemovedControl.DragDropControl.DragEnterControl.DragOverControl.DragLeaveControl.GiveFeedbackControl.HandleCreatedControl.HandleDestroyedControl.HelpRequestedControl.InvalidatedControl.PaddingChangedControl.PaintControl.QueryContinueDragControl.QueryAccessibilityHelpControl.DoubleClickControl.EnterControl.GotFocusControl.KeyDownControl.KeyPressControl.KeyUpControl.LayoutControl.LeaveControl.LostFocusControl.MouseClickControl.MouseDoubleClickControl.MouseCaptureChangedControl.MouseDownControl.MouseEnterControl.MouseLeaveControl.DpiChangedBeforeParentControl.DpiChangedAfterParentControl.MouseHoverControl.MouseMoveControl.MouseUpControl.MouseWheelControl.MoveControl.PreviewKeyDownControl.ChangeUICuesControl.StyleChangedControl.SystemColorsChangedControl.ValidatingControl.ValidatedControl.ParentChangedControl.ImeModeChangedComponent.Dispose()Component.GetService(Type)Component.ToString()Component.EventsComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

RadDiagram()

Initializes a new instance of the RadDiagram class. Sets up the control with default settings and enables gesture support.

Declaration

cs-api-definition
public RadDiagram()

Properties

ActiveTool

Gets or sets the tool which is active when interacting with the diagram elements.

Declaration

cs-api-definition
public MouseTool ActiveTool { get; set; }

Property Value

MouseTool

AllowCopy

Gets or sets a value indicating whether copying is allowed.

Declaration

cs-api-definition
public bool AllowCopy { get; set; }

Property Value

bool

True if copying is allowed; otherwise, false.

AllowCut

Gets or sets a value indicating whether cutting is allowed.

Declaration

cs-api-definition
public bool AllowCut { get; set; }

Property Value

bool

True if cutting is allowed; otherwise, false.

AllowDelete

Gets or sets a value indicating whether deleting is allowed.

Declaration

cs-api-definition
public bool AllowDelete { get; set; }

Property Value

bool

True if deleting is allowed; otherwise, false.

AllowPaste

Gets or sets a value indicating whether pasting is allowed.

Declaration

cs-api-definition
public bool AllowPaste { get; set; }

Property Value

bool

True if pasting is allowed; otherwise, false.

AutoLayout

Gets or sets the auto layout.

Declaration

cs-api-definition
public bool AutoLayout { get; set; }

Property Value

bool

BackgroundGrid

Declaration

cs-api-definition
public virtual BackgroundGrid BackgroundGrid { get; }

Property Value

BackgroundGrid

BackgroundPageGrid

Declaration

cs-api-definition
public virtual BackgroundPageGrid BackgroundPageGrid { get; }

Property Value

BackgroundPageGrid

ConnectionBridge

Gets or sets the connection bridge type.

Declaration

cs-api-definition
public BridgeType ConnectionBridge { get; set; }

Property Value

BridgeType

ConnectionDataMember

Gets or sets the links data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ConnectionDataMember { get; set; }

Property Value

string

The data member.

ConnectionRoundedCorners

Gets or sets whether the corners of the (polyline) connection are rounded.

Declaration

cs-api-definition
public bool ConnectionRoundedCorners { get; set; }

Property Value

bool

Remarks

This property has only an effect when the ConnectionType is set to Polyline.

ConnectionSourceCapTypeMember

Gets or sets the ConnectionSourceCapTypeMember data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ConnectionSourceCapTypeMember { get; set; }

Property Value

string

The data member.

ConnectionSourceConnectorMember

Gets or sets the SourceConnector data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ConnectionSourceConnectorMember { get; set; }

Property Value

string

The data member.

ConnectionSourceShapeIdMember

Gets or sets the ConnectionTargetShapeIdMember data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ConnectionSourceShapeIdMember { get; set; }

Property Value

string

The data member.

ConnectionTargetCapTypeMember

Gets or sets the ConnectionTargetCapTypeMember data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ConnectionTargetCapTypeMember { get; set; }

Property Value

string

The data member.

ConnectionTargetConnectorMember

Gets or sets the Target connector data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ConnectionTargetConnectorMember { get; set; }

Property Value

string

The data member.

ConnectionTargetShapeIdMember

Gets or sets the ConnectionTargetShapeIdMember data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ConnectionTargetShapeIdMember { get; set; }

Property Value

string

The data member.

ConnectionTextMember

Gets or sets the ConnectionTextMember data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ConnectionTextMember { get; set; }

Property Value

string

The data member.

Connections

Gets the connections.

Declaration

cs-api-definition
[Browsable(false)]
public ConnectionCollection Connections { get; }

Property Value

ConnectionCollection

ContainerGenerator

Gets the container generator.

Declaration

cs-api-definition
public IContainerGenerator<RadDiagramItem> ContainerGenerator { get; }

Property Value

IContainerGenerator<RadDiagramItem>

DataSource

Gets or sets the data source of the RadDiagram.

Declaration

cs-api-definition
public object DataSource { get; set; }

Property Value

object

DefaultSize

Gets the default size of the RadDiagram control.

Declaration

cs-api-definition
protected override Size DefaultSize { get; }

Property Value

Size

A Size object representing the default size of the control.

Overrides Control.DefaultSize

DiagramElement

Declaration

cs-api-definition
public RadDiagramElement DiagramElement { get; set; }

Property Value

RadDiagramElement

DisplayMemberPath

Gets or sets the display member path.

Declaration

cs-api-definition
public string DisplayMemberPath { get; set; }

Property Value

string

The display member path.

GraphSource

Gets or sets the graph source.

Declaration

cs-api-definition
public IGraphSource GraphSource { get; set; }

Property Value

IGraphSource

The graph source.

Groups

Gets the group collection.

Declaration

cs-api-definition
[Browsable(false)]
public IEnumerable<IGroup> Groups { get; }

Property Value

IEnumerable<IGroup>

HorizontalScrollbarVisibility

Declaration

cs-api-definition
public ScrollBarVisibility HorizontalScrollbarVisibility { get; set; }

Property Value

ScrollBarVisibility

IsBackgroundSurfaceVisible

Gets or sets whether the background grid is visible.

Declaration

cs-api-definition
public bool IsBackgroundSurfaceVisible { get; set; }

Property Value

bool

IsConnectorsManipulationEnabled

Gets or sets a value indicating whether manipulation on the connectors is enabled.

Declaration

cs-api-definition
public bool IsConnectorsManipulationEnabled { get; set; }

Property Value

bool

True if manipulation on connectors is enabled; otherwise, false.

IsDataBound

Gets a value indicating whether this instance is data bound.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsDataBound { get; }

Property Value

bool

true if this instance is data bound; otherwise, false.

IsDraggingEnabled

Gets or sets a value indicating whether dragging is enabled.

Declaration

cs-api-definition
public bool IsDraggingEnabled { get; set; }

Property Value

bool

True if dragging is enabled; otherwise, false.

IsEditable

Gets or sets a value indicating whether editing is enabled.

Declaration

cs-api-definition
public bool IsEditable { get; set; }

Property Value

bool

True if editing is enabled; otherwise, false.

IsInformationAdornerVisible

Gets or sets whether the information adorner is visible.

Declaration

cs-api-definition
public bool IsInformationAdornerVisible { get; set; }

Property Value

bool

IsManipulationAdornerVisible

Gets or sets a value indicating whether the manipulation adorner is visible.

Declaration

cs-api-definition
public bool IsManipulationAdornerVisible { get; set; }

Property Value

bool

True if the manipulation adorner is visible; otherwise, false.

IsMouseCaptured

Gets or sets a value indicating whether the mouse is captured.

Declaration

cs-api-definition
public bool IsMouseCaptured { get; set; }

Property Value

bool

True if the mouse is captured; otherwise, false.

IsPanEnabled

Gets or sets a value indicating whether panning is enabled.

Declaration

cs-api-definition
public bool IsPanEnabled { get; set; }

Property Value

bool

True if panning is enabled; otherwise, false.

IsResizingEnabled

Gets or sets a value indicating whether resizing is enabled.

Declaration

cs-api-definition
public bool IsResizingEnabled { get; set; }

Property Value

bool

True if resizing is enabled; otherwise, false.

IsRotationEnabled

Gets or sets a value indicating whether rotation is enabled.

Declaration

cs-api-definition
public bool IsRotationEnabled { get; set; }

Property Value

bool

true if this rotation is enabled; otherwise, false.

IsSettingsPaneEnabled

Hide or Show the Settings pane button.

Declaration

cs-api-definition
public bool IsSettingsPaneEnabled { get; set; }

Property Value

bool

IsSnapToGridEnabled

Gets or sets a value indicating whether grid snapping is enabled.

Declaration

cs-api-definition
public bool IsSnapToGridEnabled { get; set; }

Property Value

bool

True if grid snapping is enabled; otherwise, false.

IsSnapToItemsEnabled

Gets or sets a value indicating whether snapping of selected item(s) to the other items in the view port is enabled or not.

Declaration

cs-api-definition
public bool IsSnapToItemsEnabled { get; set; }

Property Value

bool

IsZoomEnabled

Gets or sets a value indicating whether zooming is enabled.

Declaration

cs-api-definition
public bool IsZoomEnabled { get; set; }

Property Value

bool

True if zooming is enabled; otherwise, false.

Items

Gets or sets the diagramming items.

Declaration

cs-api-definition
[Browsable(false)]
public DiagramItemCollection Items { get; }

Property Value

DiagramItemCollection

The items.

Metadata

Gets the diagram metadata.

Declaration

cs-api-definition
[Browsable(false)]
public DiagramMetadata Metadata { get; }

Property Value

DiagramMetadata

Position

Gets or sets the position.

Declaration

cs-api-definition
public Point Position { get; set; }

Property Value

Point

; The position.

RectSelectionMode

Gets or sets the rectangle selection mode.

Declaration

cs-api-definition
public RectSelectionMode RectSelectionMode { get; set; }

Property Value

RectSelectionMode

RouteConnections

Gets whether the Spline and Polyline connections will be automatically routed.

Declaration

cs-api-definition
public bool RouteConnections { get; set; }

Property Value

bool

Remarks

Setting this property has no effect on other connection types.

RoutingService

Declaration

cs-api-definition
public IRoutingService RoutingService { get; }

Property Value

IRoutingService

SelectedIndex

Gets or sets the index of the first item in the current selection or returns negative one (-1) if the selection is empty.

Declaration

cs-api-definition
public int SelectedIndex { get; set; }

Property Value

int

SelectedItem

Gets or sets the first item in the current selection or returns null if the selection is empty. This is a dependency property.

Declaration

cs-api-definition
public object SelectedItem { get; set; }

Property Value

object

SelectedItems

Gets the selected items.

Declaration

cs-api-definition
public IEnumerable<IDiagramItem> SelectedItems { get; }

Property Value

IEnumerable<IDiagramItem>

SelectionBounds

Gets the starting selection bounds.

Declaration

cs-api-definition
public Rect SelectionBounds { get; }

Property Value

Rect

SelectionMode

Gets or sets the selection mode.

Declaration

cs-api-definition
public SelectionMode SelectionMode { get; set; }

Property Value

SelectionMode

SerializedXml

Declaration

cs-api-definition
public string SerializedXml { get; set; }

Property Value

string

ServiceLocator

Gets the service locator.

Declaration

cs-api-definition
public IServiceLocator ServiceLocator { get; }

Property Value

IServiceLocator

ShapeDataMember

Gets or sets the links data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ShapeDataMember { get; set; }

Property Value

string

The data member.

ShapeHeightMember

Gets or sets the Shape height data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ShapeHeightMember { get; set; }

Property Value

string

The data member.

ShapeIdMember

Gets or sets the ID data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ShapeIdMember { get; set; }

Property Value

string

The data member.

ShapeTextMember

Gets or sets the links data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ShapeTextMember { get; set; }

Property Value

string

The data member.

ShapeTypeMember

Gets or sets the Shape data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ShapeTypeMember { get; set; }

Property Value

string

The data member.

ShapeWidthMember

Gets or sets the Shape height data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ShapeWidthMember { get; set; }

Property Value

string

The data member.

ShapeXMember

Gets or sets the Shape X position data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ShapeXMember { get; set; }

Property Value

string

The data member.

ShapeYMember

Gets or sets the Shape Y position data member.

Declaration

cs-api-definition
[Browsable(true)]
public string ShapeYMember { get; set; }

Property Value

string

The data member.

Shapes

Gets the shapes.

Declaration

cs-api-definition
[Browsable(false)]
public ShapeCollection Shapes { get; }

Property Value

ShapeCollection

SnapX

Gets or sets the horizontal snapping distance.

Declaration

cs-api-definition
public int SnapX { get; set; }

Property Value

int

The horizontal snapping distance.

SnapY

Gets or sets the vertical snapping distance.

Declaration

cs-api-definition
public int SnapY { get; set; }

Property Value

int

The vertical snapping distance.

UndoRedoService

Gets the undo redo service.

Declaration

cs-api-definition
public IUndoRedoService UndoRedoService { get; }

Property Value

IUndoRedoService

VerticalScrollbarVisibility

Declaration

cs-api-definition
public ScrollBarVisibility VerticalScrollbarVisibility { get; set; }

Property Value

ScrollBarVisibility

Viewport

Gets the bounds of the viewport.

Declaration

cs-api-definition
public Rect Viewport { get; }

Property Value

Rect

Zoom

Gets or sets the zoom. A zoom value of 1 means 100% and less then 1 means a zoom out. Zoom value will be coerced to be greater than zero, not infinity and not Nan. In addition, Zoom value will be coerced to be greater or equal than MinimumZoom and smaller or equal than MaximumZoom.

Declaration

cs-api-definition
public double Zoom { get; set; }

Property Value

double

Methods

AddConnection(IConnection, bool)

Adds a new connection to the diagram.

Declaration

cs-api-definition
public IConnection AddConnection(IConnection connection, bool isUndoable = false)

Parameters

connection

IConnection

The connection to be added.

isUndoable

bool

If set to true this action will be recorded in the undo stack.

Returns

IConnection

AddConnection(IShape, IShape, bool)

Adds a new connection to the diagram connecting the given source and target shapes.

Declaration

cs-api-definition
public IConnection AddConnection(IShape source, IShape target, bool isUndoable = false)

Parameters

source

IShape

The source or start shape of the connection.

target

IShape

The target or end shape of the connection.

isUndoable

bool

If set to true this action will be recorded in the undo stack.

Returns

IConnection

AddConnection(IShape, IShape, string, bool)

Adds a new connection to the diagram connecting the given source and target shapes.

Declaration

cs-api-definition
public IConnection AddConnection(IShape source, IShape target, string connectorsPosition, bool isUndoable = false)

Parameters

source

IShape

The source or start shape of the connection.

target

IShape

The target or end shape of the connection.

connectorsPosition

string

The connectors position.

isUndoable

bool

If set to true this action will be recorded in the undo stack.

Returns

IConnection

AddConnection(IShape, IShape, string, string, bool)

Adds a new connection to the diagram connecting the given source and target shapes.

Declaration

cs-api-definition
public IConnection AddConnection(IShape source, IShape target, string sourceConnector, string targetConnector, bool isUndoable = false)

Parameters

source

IShape

The source.

target

IShape

The target.

sourceConnector

string

The source connector position.

targetConnector

string

The target connector position.

isUndoable

bool

If set to true is undoable.

Returns

IConnection

AddConnection(Point, Point, bool)

Adds a floating connection.

Declaration

cs-api-definition
public IConnection AddConnection(Point startPoint, Point endPoint, bool isUndoable = false)

Parameters

startPoint

Point

The source (starting) point of the connection.

endPoint

Point

The target (end) point of the connection.

isUndoable

bool

True, if this action is undoable.

Returns

IConnection

Returns the added connection.

AddGlidingConnection(IShape, IShape, bool)

Adds a new gliding connection to the diagram connecting the given source and target shapes.

Declaration

cs-api-definition
public IConnection AddGlidingConnection(IShape source, IShape target, bool isUndoable = false)

Parameters

source

IShape

The source or start shape of the connection.

target

IShape

The target or end shape of the connection.

isUndoable

bool

If set to true this action will be recorded in the undo stack.

Returns

IConnection

Remarks

If the shape already contains connections on the default connectors this will raise an exception since gliding connections are mutually exclusive with normal connections. Remove first the existing connections on the source and target shapes before calling this method.

AddShape(IShape, Point?, bool)

Adds the given shape to the diagram.

Declaration

cs-api-definition
public IShape AddShape(IShape shape, Point? position = null, bool isUndoable = false)

Parameters

shape

IShape

The shape to add.

position

Point?

The position at which the shape will be added on the canvas.

isUndoable

bool

If set to true the action is undoable.

Returns

IShape

AddShape(object, Geometry, Point?, bool)

Adds a new shape to the diagram.

Declaration

cs-api-definition
public IShape AddShape(object content, Geometry geometry = null, Point? position = null, bool isUndoable = false)

Parameters

content

object

The content of the shape.

geometry

Geometry

The geometry.

position

Point?

The position.

isUndoable

bool

If set to true the action is undoable.

Returns

IShape

The added shape.

Remarks

The given object will be inserted as the content of a new RadDiagramShape and will internally uniquely identify the shape. Alternatively, you can instantiate a new shape and use this same AddShape method to add it to the diagram, in which case the shape rather than the content will uniquely identify it internally.

Align(Alignment, IEnumerable<IShape>)

Aligns the given shapes.

Declaration

cs-api-definition
public void Align(Alignment alignment, IEnumerable<IShape> shapes)

Parameters

alignment

Alignment

shapes

IEnumerable<IShape>

BeginBatchTransformation()

Begins a batch transformation and signals the undo-redo stack that a batch of transformation should be considered as one, i.e. a composite change.

Declaration

cs-api-definition
public DiagramLayoutState BeginBatchTransformation()

Returns

DiagramLayoutState

BeginInit()

Suspends layout operations during initialization of the diagram control. Prevents unnecessary updates while multiple properties are being set.

Declaration

cs-api-definition
public override void BeginInit()

Overrides RadControl.BeginInit()

BeginPrint(RadPrintDocument, PrintEventArgs)

Called when the printing begins.

Declaration

cs-api-definition
public int BeginPrint(RadPrintDocument sender, PrintEventArgs args)

Parameters

sender

RadPrintDocument

The that has initiated the printing.

args

PrintEventArgs

The event args.

Returns

int

The number of pages.

Implements IPrintable.BeginPrint(RadPrintDocument, PrintEventArgs)

BringForward(IEnumerable<IDiagramItem>, bool)

Brings the items forward.

Declaration

cs-api-definition
public void BringForward(IEnumerable<IDiagramItem> items, bool isUndoable = true)

Parameters

items

IEnumerable<IDiagramItem>

isUndoable

bool

BringToFront(IEnumerable<IDiagramItem>, bool)

Brings the items to front.

Declaration

cs-api-definition
public void BringToFront(IEnumerable<IDiagramItem> items, bool isUndoable = true)

Parameters

items

IEnumerable<IDiagramItem>

isUndoable

bool

Clear()

Clears the diagram and resets the document.

Declaration

cs-api-definition
public void Clear()

Remarks

The diagram is not saved prior to this reset. You need to handle in the application the eventual necessity to save (or request the user) the diagram before this.

CommitBatchTransformation(DiagramLayoutState, DiagramLayoutState, bool, bool, LayoutType, object)

Commits the batch transformation and ends the composite undo redo change.

Declaration

cs-api-definition
public void CommitBatchTransformation(DiagramLayoutState initialState, DiagramLayoutState finalState, bool animate = false, bool execute = true, LayoutType type = LayoutType.Sugiyama, object settings = null)

Parameters

initialState

DiagramLayoutState

The initial state.

finalState

DiagramLayoutState

The final state.

animate

bool

If set to true the layout will be animated.

execute

bool

Whether the undo-redo unit is only added or also executed.

type

LayoutType

The layout type that has been applied.

settings

object

The layout specific settings used for the layout.

Remarks

The animation tremendously decreases the performance.

Copy()

Copies the currently selected items of the diagram.

Declaration

cs-api-definition
public void Copy()

CreateChildItems(RadElement)

Creates and initializes the child elements of the RadDiagram control. Initializes and adds the diagram element to the control's element tree.

Declaration

cs-api-definition
protected override void CreateChildItems(RadElement parent)

Parameters

parent

RadElement

The parent element that contains the child items.

Overrides RadControl.CreateChildItems(RadElement)

CreateDiagramElement()

Creates a new instance of the RadDiagramElement class that will be used as the main visual element of the diagram control.

Declaration

cs-api-definition
protected virtual RadDiagramElement CreateDiagramElement()

Returns

RadDiagramElement

A new instance of RadDiagramElement.

Cut()

Cuts the currently selected items of the diagram.

Declaration

cs-api-definition
public void Cut()

Delete()

Deletes the currently selected items of the diagram.

Declaration

cs-api-definition
public virtual void Delete()

DeselectAll()

Deselects all shapes in the diagram.

Declaration

cs-api-definition
public void DeselectAll()

Deserialize(SerializationInfo)

Deserializes the specified info.

Declaration

cs-api-definition
public virtual void Deserialize(SerializationInfo info)

Parameters

info

SerializationInfo

The info.

EndInit()

Resumes layout operations after initialization of the diagram control. Updates the diagram element and applies any pending changes.

Declaration

cs-api-definition
public override void EndInit()

Overrides RadControl.EndInit()

EndPrint(RadPrintDocument, PrintEventArgs)

Called when the printing ends.

Declaration

cs-api-definition
public bool EndPrint(RadPrintDocument sender, PrintEventArgs args)

Parameters

sender

RadPrintDocument

The that has initiated the printing.

args

PrintEventArgs

The event args.

Returns

bool

[false] if cancel

Implements IPrintable.EndPrint(RadPrintDocument, PrintEventArgs)

ExportToImage()

Exports RadDiagram to Image

Declaration

cs-api-definition
public Image ExportToImage()

Returns

Image

The Image. Should be manually disposed.

ForceRefresh()

Refreshes ScrollBars and Background grids

Declaration

cs-api-definition
public void ForceRefresh()

GetSettingsDialog(RadPrintDocument)

Gets a print settings dialog that is specific for the printable object.

Declaration

cs-api-definition
public Form GetSettingsDialog(RadPrintDocument document)

Parameters

document

RadPrintDocument

The that has initiated the printing.

Returns

Form

The dialog.

Implements IPrintable.GetSettingsDialog(RadPrintDocument)

Group(string, bool, params IGroupable[])

Groups the specified items.

Declaration

cs-api-definition
public IGroup Group(string groupName = null, bool isUndoable = false, params IGroupable[] items)

Parameters

groupName

string

Name of the new group.

isUndoable

bool

If set to true the action will be recorded as undoable.

items

IGroupable[]

The groups items to ungroup.

Returns

IGroup

Group(string, params IGroupable[])

Groups the specified items.

Declaration

cs-api-definition
public IGroup Group(string groupName = null, params IGroupable[] items)

Parameters

groupName

string

Name of the new group.

items

IGroupable[]

The groups items to ungroup.

Returns

IGroup

IsInViewport(IDiagramItem)

Checks if the diagram item is in the viewport.

Declaration

cs-api-definition
public bool IsInViewport(IDiagramItem item)

Parameters

item

IDiagramItem

Returns

bool

IsInputKey(Keys)

Determines whether the specified key is an input key or a regular key for the control. Enables arrow keys and shift+arrow key combinations to be handled by the control.

Declaration

cs-api-definition
protected override bool IsInputKey(Keys keyData)

Parameters

keyData

Keys

A Keys value that represents the key to check.

Returns

bool

true if the specified key is an input key; otherwise, false.

Overrides RadControl.IsInputKey(Keys)

LayoutAsync(LayoutType, object)

Organizes the diagram using the specified layout asynchronously.

Declaration

cs-api-definition
public void LayoutAsync(LayoutType type = LayoutType.Sugiyama, object settings = null)

Parameters

type

LayoutType

The layout type to apply.

settings

object

The settings specific to the layout type.

Load(string)

Loads the specified serialization string.

Declaration

cs-api-definition
public void Load(string serializationValue)

Parameters

serializationValue

string

The serialization value.

LoadFromFile(string)

Load Diagram to XML file

Declaration

cs-api-definition
public void LoadFromFile(string fileName)

Parameters

fileName

string

OnBindingContextChanged(EventArgs)

Raises the BindingContextChanged event and updates the diagram element's binding context. Ensures that binding context changes are propagated to child elements.

Declaration

cs-api-definition
protected override void OnBindingContextChanged(EventArgs e)

Parameters

e

EventArgs

An EventArgs that contains the event data.

Overrides RadControl.OnBindingContextChanged(EventArgs)

OnKeyDown(KeyEventArgs)

Raises the KeyDown event and processes keyboard input for the diagram. Forwards key events to the diagram element for handling, unless a text editor is active.

Declaration

cs-api-definition
protected override void OnKeyDown(KeyEventArgs e)

Parameters

e

KeyEventArgs

A KeyEventArgs that contains the event data.

Overrides RadControl.OnKeyDown(KeyEventArgs)

OnMouseDown(MouseEventArgs)

Raises the MouseDown event and handles mouse down interactions for the diagram. Delegates mouse handling to the diagram element's input behavior system.

Declaration

cs-api-definition
protected override void OnMouseDown(MouseEventArgs e)

Parameters

e

MouseEventArgs

A MouseEventArgs that contains the event data.

Overrides RadControl.OnMouseDown(MouseEventArgs)

OnMouseMove(MouseEventArgs)

Raises the MouseMove event and handles mouse movement interactions for the diagram. Delegates mouse movement handling to the diagram element's input behavior system.

Declaration

cs-api-definition
protected override void OnMouseMove(MouseEventArgs e)

Parameters

e

MouseEventArgs

A MouseEventArgs that contains the event data.

Overrides RadControl.OnMouseMove(MouseEventArgs)

OnMouseUp(MouseEventArgs)

Raises the MouseUp event and handles mouse release interactions for the diagram. Delegates mouse up handling to the diagram element's input behavior system.

Declaration

cs-api-definition
protected override void OnMouseUp(MouseEventArgs e)

Parameters

e

MouseEventArgs

A MouseEventArgs that contains the event data.

Overrides RadControl.OnMouseUp(MouseEventArgs)

OnPaintBackground(PaintEventArgs)

Raises the paint background event and handles special drawing requirements. Detects changes in the clipping rectangle and triggers a redraw when necessary.

Declaration

cs-api-definition
protected override void OnPaintBackground(PaintEventArgs e)

Parameters

e

PaintEventArgs

A PaintEventArgs that contains the event data.

Overrides ScrollableControl.OnPaintBackground(PaintEventArgs)

OnVisibleChanged(EventArgs)

Raises the VisibleChanged event and performs necessary updates when visibility changes. Refreshes the diagram when the control becomes visible.

Declaration

cs-api-definition
protected override void OnVisibleChanged(EventArgs e)

Parameters

e

EventArgs

An EventArgs that contains the event data.

Overrides RadControl.OnVisibleChanged(EventArgs)

PanToPosition(Point)

Pans the diagram to the provided position. The values are interpreted in the zoomed coordinate system. This means that panning with 100 pixel will result in visual translation with 100 pixel.

Declaration

cs-api-definition
public virtual void PanToPosition(Point newPosition)

Parameters

newPosition

Point

The new position coordinates to pan the diagram to.

Paste()

Pastes the content of the clipboard onto the diagram.

Declaration

cs-api-definition
public virtual void Paste()

Print()

Directly prints the RadDiagram to the default printer.

Declaration

cs-api-definition
public virtual void Print()

Print(bool)

Directly prints the RadDiagram to the default printer or shows printer settings and then prints the RadDiagram.

Declaration

cs-api-definition
public virtual void Print(bool showPrinterSettings)

Parameters

showPrinterSettings

bool

Indicates whether printer settings dialog should be shown.

Print(bool, RadPrintDocument)

Directly prints the RadDiagram to the default printer or shows printer settings and then prints the RadDiagram.

Declaration

cs-api-definition
public virtual void Print(bool showPrinterSettings, RadPrintDocument document)

Parameters

showPrinterSettings

bool

Indicates whether printer settings dialog should be shown.

document

RadPrintDocument

As instance of RadPrintDocument used to control the print process.

PrintPage(int, RadPrintDocument, PrintPageEventArgs)

Prints the page with the specified number.

Declaration

cs-api-definition
public bool PrintPage(int pageNumber, RadPrintDocument sender, PrintPageEventArgs args)

Parameters

pageNumber

int

The number of the current page.

sender

RadPrintDocument

The that has initiated the printing.

args

PrintPageEventArgs

The event args.

Returns

bool

[true] if there are more pages, [false] otherwise

Implements IPrintable.PrintPage(int, RadPrintDocument, PrintPageEventArgs)

PrintPreview()

Shows a RadPrintPreviewDialog for editing print settings.

Declaration

cs-api-definition
public virtual void PrintPreview()

PrintPreview(RadPrintDocument)

Shows a RadPrintPreviewDialog for editing print settings.

Declaration

cs-api-definition
public virtual void PrintPreview(RadPrintDocument document)

Parameters

document

RadPrintDocument

As instance of RadPrintDocument used to control the print process.

ProcessAutoSizeChanged(bool)

Overrides the base implementation of ProcessAutoSizeChanged. This method is intentionally empty as RadDiagram does not support auto-sizing.

Declaration

cs-api-definition
protected override void ProcessAutoSizeChanged(bool value)

Parameters

value

bool

A boolean value indicating whether auto-size is enabled.

Overrides RadControl.ProcessAutoSizeChanged(bool)

Redo()

Performs redo on the last undone action.

Declaration

cs-api-definition
public void Redo()

RemoveConnection(IConnection, bool)

Removes the connection.

Declaration

cs-api-definition
public void RemoveConnection(IConnection connection, bool isUndoable = false)

Parameters

connection

IConnection

The connection.

isUndoable

bool

If set to true the action is undoable.

RemoveShape(IShape, bool)

Removes the shape.

Declaration

cs-api-definition
public void RemoveShape(IShape shape, bool isUndoable = false)

Parameters

shape

IShape

The shape.

isUndoable

bool

If set to true the action is undoable.

Save()

Saves the diagram.

Declaration

cs-api-definition
public string Save()

Returns

string

Returns the serialization string.

SaveToFile(string)

Save Diagram to XML file

Declaration

cs-api-definition
public void SaveToFile(string fileName)

Parameters

fileName

string

SelectAll()

Selects all shapes in the diagram.

Declaration

cs-api-definition
public void SelectAll()

SendBackward(IEnumerable<IDiagramItem>, bool)

Sends the items backward.

Declaration

cs-api-definition
public void SendBackward(IEnumerable<IDiagramItem> items, bool isUndoable = true)

Parameters

items

IEnumerable<IDiagramItem>

isUndoable

bool

SendToBack(IEnumerable<IDiagramItem>, bool)

Sends the items to back.

Declaration

cs-api-definition
public void SendToBack(IEnumerable<IDiagramItem> items, bool isUndoable = true)

Parameters

items

IEnumerable<IDiagramItem>

isUndoable

bool

Serialize()

Serializes this instance.

Declaration

cs-api-definition
public virtual SerializationInfo Serialize()

Returns

SerializationInfo

SetLayout(LayoutType, object)

Organizes the diagram using the specified layout.

Declaration

cs-api-definition
public void SetLayout(LayoutType type = LayoutType.Sugiyama, object settings = null)

Parameters

type

LayoutType

The layout type to apply.

settings

object

The settings specific to the layout type.

Snap(IEnumerable<IShape>)

Snaps the specified shapes.

Declaration

cs-api-definition
public void Snap(IEnumerable<IShape> shapes)

Parameters

shapes

IEnumerable<IShape>

Undo()

Performs undo on the last action.

Declaration

cs-api-definition
public void Undo()

Ungroup(bool, params IGroup[])

Ungroups the specified items.

Declaration

cs-api-definition
public void Ungroup(bool isUndoable, params IGroup[] groups)

Parameters

isUndoable

bool

If set to true the action will be recorded as undoable.

groups

IGroup[]

The groups items to ungroup.

Ungroup(params IGroup[])

Ungroups the specified items.

Declaration

cs-api-definition
public void Ungroup(params IGroup[] groups)

Parameters

groups

IGroup[]

The groups items to ungroup.

ZoomIn(double?, Point?)

Zooms in the diagram. Simulates zooming with the mouse. Performs incremental zoom taking into account previous zoom operations.

Declaration

cs-api-definition
public virtual void ZoomIn(double? factor = null, Point? targetPoint = null)

Parameters

factor

double?

The value by which to change Zoom property. When factor is null, smaller or equal to zero the ZoomScaleFactor value will be used.

targetPoint

Point?

The center of the zoom. The point should be provided in viewport coordinates.

ZoomOut(double?, Point?)

Zooms out the diagram. Simulates zooming with the mouse. Performs incremental zoom taking into account previous zoom operations.

Declaration

cs-api-definition
public virtual void ZoomOut(double? factor = null, Point? targetPoint = null)

Parameters

factor

double?

The value by which to change Zoom property. When factor is null, smaller or equal to zero the ZoomScaleFactor value will be used.

targetPoint

Point?

The center of the zoom. The point should be provided in viewport coordinates.

Events

AdditionalContentActivated

Occurs when AdditionContent is activated.

Declaration

cs-api-definition
public event EventHandler<AdditionalContentActivatedEventArgs> AdditionalContentActivated

Event Value

EventHandler<AdditionalContentActivatedEventArgs>

CommandExecuted

Occurs when a async command is executed.

Declaration

cs-api-definition
public event EventHandler<CommandEventArgs> CommandExecuted

Event Value

EventHandler<CommandEventArgs>

ConnectionAdded

Occurs when a connection is added.

Declaration

cs-api-definition
public event EventHandler<GenericEventArgs<IConnection>> ConnectionAdded

Event Value

EventHandler<GenericEventArgs<IConnection>>

ConnectionAdding

Occurs when the connection is being added.

Declaration

cs-api-definition
public event EventHandler<GenericEventArgs<IConnection>> ConnectionAdding

Event Value

EventHandler<GenericEventArgs<IConnection>>

ConnectionClicked

Occurs when connection is clicked.

Declaration

cs-api-definition
public event EventHandler<GenericEventArgs<IConnection>> ConnectionClicked

Event Value

EventHandler<GenericEventArgs<IConnection>>

ConnectionDeserialized

Occurs when a connection has been deserialized.

Declaration

cs-api-definition
public event EventHandler<SerializationEventArgs<IConnection>> ConnectionDeserialized

Event Value

EventHandler<SerializationEventArgs<IConnection>>

Remarks

This event allows you to recover additional, application specific data from the serialization.

ConnectionManipulationCompleted

Occurs when the connection manipulation has completed.

Declaration

cs-api-definition
public event EventHandler<ManipulationEventArgs> ConnectionManipulationCompleted

Event Value

EventHandler<ManipulationEventArgs>

ConnectionManipulationStarted

Occurs before the connection manipulation has started.

Declaration

cs-api-definition
public event EventHandler<ManipulationEventArgs> ConnectionManipulationStarted

Event Value

EventHandler<ManipulationEventArgs>

ConnectionSerialized

Occurs when a connection has been serialized.

Declaration

cs-api-definition
public event EventHandler<SerializationEventArgs<IConnection>> ConnectionSerialized

Event Value

EventHandler<SerializationEventArgs<IConnection>>

Remarks

This event allows you to add additional, application specific data to the serialization.

ConnectorActivationChanged

Occurs after a connector activation or deactivation.

Declaration

cs-api-definition
public event EventHandler<ConnectorActivationChangedEventArgs> ConnectorActivationChanged

Event Value

EventHandler<ConnectorActivationChangedEventArgs>

Deserialized

Occurs when the diagram has been deserialized.

Declaration

cs-api-definition
public event RoutedEventHandler Deserialized

Event Value

RoutedEventHandler

DiagramLayoutComplete

Occurs when the diagram layout has completed.

Declaration

cs-api-definition
public event EventHandler<DiagramLayoutEventArgs> DiagramLayoutComplete

Event Value

EventHandler<DiagramLayoutEventArgs>

Drag

Occurs when an item is dragged.

Declaration

cs-api-definition
public event EventHandler<DragRoutedEventArgs> Drag

Event Value

EventHandler<DragRoutedEventArgs>

GraphSourceChanged

Occurs when the graph source has changed.

Declaration

cs-api-definition
public event EventHandler GraphSourceChanged

Event Value

EventHandler

GraphSourceChanging

Occurs when the graph source begins changing.

Declaration

cs-api-definition
public event EventHandler GraphSourceChanging

Event Value

EventHandler

ItemDataBound

Occurs after an Item is databound.

Declaration

cs-api-definition
public event DiagramItemDataBindingEventHandler ItemDataBound

Event Value

DiagramItemDataBindingEventHandler

ItemsChanged

Occurs when count of the items change.

Declaration

cs-api-definition
public event EventHandler<DiagramItemsChangedEventArgs> ItemsChanged

Event Value

EventHandler<DiagramItemsChangedEventArgs>

ItemsChanging

Occurs while the diagram items are changing.

Declaration

cs-api-definition
public event EventHandler<DiagramItemsChangingEventArgs> ItemsChanging

Event Value

EventHandler<DiagramItemsChangingEventArgs>

MetadataDeserialized

Occurs when the diagram's metadata has been deserialized.

Declaration

cs-api-definition
public event EventHandler<SerializationInfoEventArgs> MetadataDeserialized

Event Value

EventHandler<SerializationInfoEventArgs>

Remarks

The event allows you to deserialize the additional data added, if any, using the MetadataDeserialized event handler.

MetadataSerialized

Occurs when the diagram's metadata has been serialized.

Declaration

cs-api-definition
public event EventHandler<SerializationInfoEventArgs> MetadataSerialized

Event Value

EventHandler<SerializationInfoEventArgs>

Remarks

This event allows you to add additional, application specific data to the serialization.

Pan

Occurs after the diagram is panned.

Declaration

cs-api-definition
public event EventHandler<PositionChangedRoutedEventArgs> Pan

Event Value

EventHandler<PositionChangedRoutedEventArgs>

PositionChanged

Occurs when the position has changed.

Declaration

cs-api-definition
public event EventHandler<PositionChangedEventArgs> PositionChanged

Event Value

EventHandler<PositionChangedEventArgs>

PreviewAdditionalContentActivated

Occurs when AdditionContent is about to be activated.

Declaration

cs-api-definition
public event EventHandler<AdditionalContentActivatedEventArgs> PreviewAdditionalContentActivated

Event Value

EventHandler<AdditionalContentActivatedEventArgs>

PreviewDrag

Occurs before an item is dragged.

Declaration

cs-api-definition
public event EventHandler<DragRoutedEventArgs> PreviewDrag

Event Value

EventHandler<DragRoutedEventArgs>

PreviewPan

Occurs before the diagram is panned.

Declaration

cs-api-definition
public event EventHandler<PositionChangedRoutedEventArgs> PreviewPan

Event Value

EventHandler<PositionChangedRoutedEventArgs>

PreviewResize

Occurs before an item is resized.

Declaration

cs-api-definition
public event EventHandler<ResizeRoutedEventArgs> PreviewResize

Event Value

EventHandler<ResizeRoutedEventArgs>

PreviewRotate

Occurs before an item is rotated.

Declaration

cs-api-definition
public event EventHandler<RoutedEventArgs> PreviewRotate

Event Value

EventHandler<RoutedEventArgs>

PreviewSelectionChanged

Occurs when the selection of the diagram starts changing.

Declaration

cs-api-definition
public event EventHandler PreviewSelectionChanged

Event Value

EventHandler

PreviewZoom

Occurs before the zoom has been changed.

Declaration

cs-api-definition
public event EventHandler<DiagramZoomEventArgs> PreviewZoom

Event Value

EventHandler<DiagramZoomEventArgs>

Resize

Occurs when an item is resized.

Declaration

cs-api-definition
public event EventHandler<ResizingEventArgs> Resize

Event Value

EventHandler<ResizingEventArgs>

Rotate

Occurs when an item is rotated.

Declaration

cs-api-definition
public event EventHandler<RotateRoutedEventArgs> Rotate

Event Value

EventHandler<RotateRoutedEventArgs>

SelectionBoundsChanged

Declaration

cs-api-definition
public event EventHandler SelectionBoundsChanged

Event Value

EventHandler

SelectionChanged

Occurs when the selection of the diagram changes.

Declaration

cs-api-definition
public event EventHandler SelectionChanged

Event Value

EventHandler

Serialized

Occurs after the diagram has been serialized.

Declaration

cs-api-definition
public event RoutedEventHandler Serialized

Event Value

RoutedEventHandler

ShapeClicked

Occurs when shape is clicked.

Declaration

cs-api-definition
public event EventHandler<ShapeRoutedEventArgs> ShapeClicked

Event Value

EventHandler<ShapeRoutedEventArgs>

ShapeDeserialized

Occurs when a shape has been deserialized.

Declaration

cs-api-definition
public event EventHandler<SerializationEventArgs<IShape>> ShapeDeserialized

Event Value

EventHandler<SerializationEventArgs<IShape>>

Remarks

The event allows you to deserialize the additional data added, if any, using the ShapeSerialized event handler.

ShapeDoubleClicked

Occurs when a shape has been double-clicked.

Declaration

cs-api-definition
public event EventHandler<ShapeRoutedEventArgs> ShapeDoubleClicked

Event Value

EventHandler<ShapeRoutedEventArgs>

ShapeSerialized

Occurs when a shape has been serialized.

Declaration

cs-api-definition
public event EventHandler<SerializationEventArgs<IShape>> ShapeSerialized

Event Value

EventHandler<SerializationEventArgs<IShape>>

Remarks

This event allows you to add additional, application specific data to the serialization.

ZoomChanged

Occurs when the zoom has been changed.

Declaration

cs-api-definition
public event EventHandler<DiagramZoomEventArgs> ZoomChanged

Event Value

EventHandler<DiagramZoomEventArgs>

Extension Methods

In this article
DefinitionConstructorsRadDiagram()PropertiesActiveToolAllowCopyAllowCutAllowDeleteAllowPasteAutoLayoutBackgroundGridBackgroundPageGridConnectionBridgeConnectionDataMemberConnectionRoundedCornersConnectionSourceCapTypeMemberConnectionSourceConnectorMemberConnectionSourceShapeIdMemberConnectionTargetCapTypeMemberConnectionTargetConnectorMemberConnectionTargetShapeIdMemberConnectionTextMemberConnectionsContainerGeneratorDataSourceDefaultSizeDiagramElementDisplayMemberPathGraphSourceGroupsHorizontalScrollbarVisibilityIsBackgroundSurfaceVisibleIsConnectorsManipulationEnabledIsDataBoundIsDraggingEnabledIsEditableIsInformationAdornerVisibleIsManipulationAdornerVisibleIsMouseCapturedIsPanEnabledIsResizingEnabledIsRotationEnabledIsSettingsPaneEnabledIsSnapToGridEnabledIsSnapToItemsEnabledIsZoomEnabledItemsMetadataPositionRectSelectionModeRouteConnectionsRoutingServiceSelectedIndexSelectedItemSelectedItemsSelectionBoundsSelectionModeSerializedXmlServiceLocatorShapeDataMemberShapeHeightMemberShapeIdMemberShapeTextMemberShapeTypeMemberShapeWidthMemberShapeXMemberShapeYMemberShapesSnapXSnapYUndoRedoServiceVerticalScrollbarVisibilityViewportZoomMethodsAddConnection(IConnection, bool)AddConnection(IShape, IShape, bool)AddConnection(IShape, IShape, string, bool)AddConnection(IShape, IShape, string, string, bool)AddConnection(Point, Point, bool)AddGlidingConnection(IShape, IShape, bool)AddShape(IShape, Point?, bool)AddShape(object, Geometry, Point?, bool)Align(Alignment, IEnumerable<IShape>)BeginBatchTransformation()BeginInit()BeginPrint(RadPrintDocument, PrintEventArgs)BringForward(IEnumerable<IDiagramItem>, bool)BringToFront(IEnumerable<IDiagramItem>, bool)Clear()CommitBatchTransformation(DiagramLayoutState, DiagramLayoutState, bool, bool, LayoutType, object)Copy()CreateChildItems(RadElement)CreateDiagramElement()Cut()Delete()DeselectAll()Deserialize(SerializationInfo)EndInit()EndPrint(RadPrintDocument, PrintEventArgs)ExportToImage()ForceRefresh()GetSettingsDialog(RadPrintDocument)Group(string, bool, params IGroupable[])Group(string, params IGroupable[])IsInViewport(IDiagramItem)IsInputKey(Keys)LayoutAsync(LayoutType, object)Load(string)LoadFromFile(string)OnBindingContextChanged(EventArgs)OnKeyDown(KeyEventArgs)OnMouseDown(MouseEventArgs)OnMouseMove(MouseEventArgs)OnMouseUp(MouseEventArgs)OnPaintBackground(PaintEventArgs)OnVisibleChanged(EventArgs)PanToPosition(Point)Paste()Print()Print(bool)Print(bool, RadPrintDocument)PrintPage(int, RadPrintDocument, PrintPageEventArgs)PrintPreview()PrintPreview(RadPrintDocument)ProcessAutoSizeChanged(bool)Redo()RemoveConnection(IConnection, bool)RemoveShape(IShape, bool)Save()SaveToFile(string)SelectAll()SendBackward(IEnumerable<IDiagramItem>, bool)SendToBack(IEnumerable<IDiagramItem>, bool)Serialize()SetLayout(LayoutType, object)Snap(IEnumerable<IShape>)Undo()Ungroup(bool, params IGroup[])Ungroup(params IGroup[])ZoomIn(double?, Point?)ZoomOut(double?, Point?)EventsAdditionalContentActivatedCommandExecutedConnectionAddedConnectionAddingConnectionClickedConnectionDeserializedConnectionManipulationCompletedConnectionManipulationStartedConnectionSerializedConnectorActivationChangedDeserializedDiagramLayoutCompleteDragGraphSourceChangedGraphSourceChangingItemDataBoundItemsChangedItemsChangingMetadataDeserializedMetadataSerializedPanPositionChangedPreviewAdditionalContentActivatedPreviewDragPreviewPanPreviewResizePreviewRotatePreviewSelectionChangedPreviewZoomResizeRotateSelectionBoundsChangedSelectionChangedSerializedShapeClickedShapeDeserializedShapeDoubleClickedShapeSerializedZoomChangedExtension Methods
Not finding the help you need?
Contact Support