IGraph
Defines the diagramming control's API.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public interface IGraph : ISerializable, ISupportManipulation
Derived Classes:
Inherited Members
Properties
Gets the connections in the current diagram.
ConnectionCollection Connections { get; }
Cursor
Cursor
Gets or sets the current cursor.
Cursor Cursor { get; set; }
Gets or sets the MVVM source of the diagram.
IGraphSource GraphSource { get; set; }
Gets the groups in the current diagram.
IEnumerable<IGroup> Groups { get; }
Gets or sets a value indicating whether the underlying graph structure is a directional graph (aka digraph).
bool IgnoreLinkDirection { get; set; }
True if link directions are ignored; otherwise, false.
Gets or sets a value indicating whether the background visual is visible.
bool IsBackgroundSurfaceVisible { get; set; }
True if the grid is visible; otherwise, false.
Gets or sets a value indicating whether editing is enabled.
bool IsEditable { get; set; }
True if editing is enabled; otherwise, false.
Note that the similar lower-level IsEditable will be overruled by this setting.
Gets or sets whether the control has currently captured the mouse pointer.
bool IsMouseCaptured { get; set; }
True if this instance is mouse captured; otherwise, false.
Gets or sets a value indicating whether panning is enabled.
bool IsPanEnabled { get; set; }
True if panning is enabled; otherwise, false.
Gets or sets a value indicating whether snapping is enabled.
bool IsSnapToGridEnabled { get; set; }
True if snapping is enabled; otherwise, false.
Gets or sets a value indicating whether snapping of selected item(s) to the other items in the view port is enabled or not.
bool IsSnapToItemsEnabled { get; set; }
Gets a value indicating whether virtualization is switched on.
bool IsVirtualizing { get; }
True if this instance is virtualizing; otherwise, false.
Gets or sets a value indicating whether zooming is enabled.
bool IsZoomEnabled { get; set; }
True if zooming is enabled; otherwise, false.
Gets all (shapes and connections) the diagram items.
DiagramItemCollection Items { get; }
Gets the metadata of the diagram.
DiagramMetadata Metadata { get; }
Position
Point
Gets or sets the panning position.
Point Position { get; set; }
Gets or sets whether items are selected if they are fully or partially contained in the selection rectangle.
RectSelectionMode RectSelectionMode { get; set; }
Gets or sets the selection mode, i.e. how elements are being selected in responds to the overlap of a shape's bounds and the selection rectangle.
SelectionMode SelectionMode { get; set; }
Gets the shapes of the current diagram.
ShapeCollection Shapes { get; }
Viewport
Rect
Gets the viewport rectangle.
Rect Viewport { get; }
Methods
Adds a new connection to the diagram.
IConnection AddConnection(IConnection connection, bool isUndoable = false)
The connection to be added.
isUndoableboolIf set to true the addition will be recorded as undoable.
Adds a connection to the diagram.
Adds a floating connection to the diagram.
IConnection AddConnection(Point startPoint, Point endPoint, bool isUndoable = false)
The source (starting) point of the connection.
endPointPointThe target (end) point of the connection.
isUndoableboolTrue, if this action is undoable.
Returns:Returns the added connection.
A floating connection is a connection which is not necessarily at its source or target attached to a shape.
Adds a new shape to the diagram.
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.
Commits the batch transformation and ends the composite undo redo change.
void CommitBatchTransformation(DiagramLayoutState initialState, DiagramLayoutState finalState, bool animate, bool execute, LayoutType type = LayoutType.Sugiyama, object settings = null)
The initial state.
finalStateDiagramLayoutStateThe final state of the shapes after layout.
animateboolIf set to true the layout transition will be animated.
If true the batch will be executed, otherwise only the undo units will be added.
The layout type that has been applied.
settingsobjectThe layout specific settings used for the layout.
Groups the given items in a new group with the specified name.
IGroup Group(string groupName = null, bool isUndoable = false, params IGroupable[] items)
Name of the group.
isUndoableboolIf set to true the operation [is undoable].
The items to be grouped.
Returns:Groups the given items in a new group with the specified name.
IGroup Group(string groupName = null, params IGroupable[] items)
Name of the group.
itemsIGroupable[]The items to be grouped.
Returns:Removes a connection from the diagram.
void RemoveConnection(IConnection connection, bool isUndoable = false)
The connection to be removed.
isUndoableboolIf set to true the addition will be recorded as undoable.
Ungroups the specified groups.