Interface IGraph
Defines the diagramming control's API.
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public interface IGraph : ISerializable, ISupportManipulation
Properties
Connections
Gets the connections in the current diagram.
Declaration
ConnectionCollection Connections { get; }
Property Value
ConnectionCollection
|
See Also
Cursor
Gets or sets the current cursor.
Declaration
Cursor Cursor { get; set; }
Property Value
System.Windows.Input.Cursor
|
GraphSource
Gets or sets the MVVM source of the diagram.
Declaration
IGraphSource GraphSource { get; set; }
Property Value
IGraphSource
|
Groups
Gets the groups in the current diagram.
Declaration
IEnumerable<IGroup> Groups { get; }
Property Value
System.Collections.Generic.IEnumerable<IGroup>
|
IgnoreLinkDirection
Gets or sets a value indicating whether the underlying graph structure is a directional graph (aka digraph).
Declaration
bool IgnoreLinkDirection { get; set; }
Property Value
System.Boolean
|
IsBackgroundSurfaceVisible
Gets or sets a value indicating whether the background visual is visible.
Declaration
bool IsBackgroundSurfaceVisible { get; set; }
Property Value
System.Boolean
|
IsEditable
Gets or sets a value indicating whether editing is enabled.
Declaration
bool IsEditable { get; set; }
Property Value
System.Boolean
|
Remarks
Note that the similar lower-level IsEditable will be overruled by this setting.
IsMouseCaptured
Gets or sets whether the control has currently captured the mouse pointer.
Declaration
bool IsMouseCaptured { get; set; }
Property Value
System.Boolean
|
IsPanEnabled
Gets or sets a value indicating whether panning is enabled.
Declaration
bool IsPanEnabled { get; set; }
Property Value
System.Boolean
|
IsSnapToGridEnabled
Gets or sets a value indicating whether snapping is enabled.
Declaration
bool IsSnapToGridEnabled { get; set; }
Property Value
System.Boolean
|
See Also
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
bool IsSnapToItemsEnabled { get; set; }
Property Value
System.Boolean
|
IsVirtualizing
Gets a value indicating whether virtualization is switched on.
Declaration
bool IsVirtualizing { get; }
Property Value
System.Boolean
|
IsZoomEnabled
Gets or sets a value indicating whether zooming is enabled.
Declaration
bool IsZoomEnabled { get; set; }
Property Value
System.Boolean
|
See Also
Items
Gets all (shapes and connections) the diagram items.
Declaration
DiagramItemCollection Items { get; }
Property Value
DiagramItemCollection
|
See Also
Metadata
Gets the metadata of the diagram.
Declaration
DiagramMetadata Metadata { get; }
Property Value
DiagramMetadata
|
See Also
Position
Gets or sets the panning position.
Declaration
Point Position { get; set; }
Property Value
System.Windows.Point
|
RectSelectionMode
Gets or sets whether items are selected if they are fully or partially contained in the selection rectangle.
Declaration
RectSelectionMode RectSelectionMode { get; set; }
Property Value
RectSelectionMode
|
SelectionMode
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.
Declaration
SelectionMode SelectionMode { get; set; }
Property Value
SelectionMode
|
Shapes
Gets the shapes of the current diagram.
Declaration
ShapeCollection Shapes { get; }
Property Value
ShapeCollection
|
See Also
SnapX
Gets or sets the horizontal snap value.
Declaration
int SnapX { get; set; }
Property Value
System.Int32
|
See Also
SnapY
Gets or sets the vertical snap value.
Declaration
int SnapY { get; set; }
Property Value
System.Int32
|
See Also
Viewport
Gets the viewport rectangle.
Declaration
Rect Viewport { get; }
Property Value
System.Windows.Rect
|
Zoom
Gets or sets the zoom level.
Declaration
double Zoom { get; set; }
Property Value
System.Double
|
Remarks
The default zoom level of 100% corresponds to a Zoom value of 1d
. Values bigger than one will zoom into the diagram while values smaller than one will zoom out.
See Also
Methods
AddConnection(Point, Point, Boolean)
Adds a floating connection to the diagram.
Declaration
IConnection AddConnection(Point startPoint, Point endPoint, bool isUndoable = false)
Parameters
System.Windows.Point
startPoint
The source (starting) point of the connection. |
System.Windows.Point
endPoint
The target (end) point of the connection. |
System.Boolean
isUndoable
True, if this action is undoable. |
Returns
IConnection
Returns the added connection. |
Remarks
A floating connection is a connection which is not necessarily at its source or target attached to a shape.
AddConnection(IConnection, Boolean)
Adds a new connection to the diagram.
Declaration
IConnection AddConnection(IConnection connection, bool isUndoable = false)
Parameters
IConnection
connection
The connection to be added. |
System.Boolean
isUndoable
If set to |
Returns
IConnection
|
AddConnection(IShape, IShape, Boolean)
Adds a connection to the diagram.
Declaration
IConnection AddConnection(IShape source, IShape target, bool isUndoable = false)
Parameters
IShape
source
The source shape of this connection. |
IShape
target
The target shape of this connection. |
System.Boolean
isUndoable
If set to |
Returns
IConnection
|
AddShape(IShape, Nullable<Point>, Boolean)
Adds a new shape to the diagram.
Declaration
IShape AddShape(IShape shape, Point? position = default(Point? ), bool isUndoable = false)
Parameters
IShape
shape
The shape to add. |
System.Nullable<System.Windows.Point>
position
The position at which the newly created shape should be positioned. |
System.Boolean
isUndoable
If set to |
Returns
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
DiagramLayoutState BeginBatchTransformation()
Returns
DiagramLayoutState
|
See Also
CommitBatchTransformation(DiagramLayoutState, DiagramLayoutState, Boolean, Boolean, LayoutType, Object)
Commits the batch transformation and ends the composite undo redo change.
Declaration
void CommitBatchTransformation(DiagramLayoutState initialState, DiagramLayoutState finalState, bool animate, bool execute, LayoutType type = LayoutType.Sugiyama, object settings = null)
Parameters
DiagramLayoutState
initialState
The initial state. |
DiagramLayoutState
finalState
The final state of the shapes after layout. |
System.Boolean
animate
If set to |
System.Boolean
execute
If |
LayoutType
type
The layout type that has been applied. |
System.Object
settings
The layout specific settings used for the layout. |
See Also
Group(String, Boolean, IGroupable[])
Groups the given items in a new group with the specified name.
Declaration
IGroup Group(string groupName = null, bool isUndoable = false, params IGroupable[] items)
Parameters
System.String
groupName
Name of the group. |
System.Boolean
isUndoable
If set to |
IGroupable[]
items
The items to be grouped. |
Returns
IGroup
|
Group(String, IGroupable[])
Groups the given items in a new group with the specified name.
Declaration
IGroup Group(string groupName = null, params IGroupable[] items)
Parameters
System.String
groupName
Name of the group. |
IGroupable[]
items
The items to be grouped. |
Returns
IGroup
|
RemoveConnection(IConnection, Boolean)
Removes a connection from the diagram.
Declaration
void RemoveConnection(IConnection connection, bool isUndoable = false)
Parameters
IConnection
connection
The connection to be removed. |
System.Boolean
isUndoable
If set to |
RemoveShape(IShape, Boolean)
Removes a shape from the diagram.
Declaration
void RemoveShape(IShape shape, bool isUndoable = false)
Parameters
IShape
shape
The shape to be removed. |
System.Boolean
isUndoable
If set to |
Ungroup(Boolean, IGroup[])
Ungroups the specified groups.
Declaration
void Ungroup(bool isUndoable = false, params IGroup[] groups)
Parameters
System.Boolean
isUndoable
If set to |
IGroup[]
groups
The groups. |
Ungroup(IGroup[])
Ungroups the specified groups.
Declaration
void Ungroup(params IGroup[] groups)
Parameters
IGroup[]
groups
The groups. |