Assembly: yWorks.yFilesWPF.Viewer (in yWorks.yFilesWPF.Viewer.dll) Version: 2.2.0.2 (2.2.0.2)
Syntax
| C# |
|---|
[ObfuscationAttribute(StripAfterObfuscation = false, Exclude = true, ApplyToMembers = false)] public class GraphControl : CanvasControl |
| Visual Basic |
|---|
<ObfuscationAttribute(StripAfterObfuscation := False, Exclude := True, _ ApplyToMembers := False)> _ Public Class GraphControl _ Inherits CanvasControl |
Remarks
This is a specialized CanvasControl that can hold, display, and edit an IGraph instance. It provides access to the Graph and Selection instances, as well as provides convenience methods for Undo()()()() and Redo()()()() operations, as well as Cut()()()(), Copy()()()(), and Paste()()()() operations. Additionally it provides convenience methods for exporting the graph to GraphML and importing a graph from GraphML.
This control comes with a number of additional default command bindings that work on the graph instance (see also view port related commands in CanvasControl):
- ApplicationCommands.Cut
- ApplicationCommands.Copy
- ApplicationCommands.Paste
- ApplicationCommands.Undo
- ApplicationCommands.Redo
The following commands are bound to methods implemented by this class, but are disabled by default:
- ApplicationCommands.Open
- ApplicationCommands.Save
- ApplicationCommands.SaveAs
- FitGraphBoundsCommand that invokes FitGraphBounds()()()()
- SetCurrentItemCommand for setting the CurrentItem
- ZoomToCurrentItemCommand for adjusting the Viewport to the CurrentItem
Related Reading in the Developer's Guide
Related Demo Applications
Inheritance Hierarchy
System.Windows.Threading..::..DispatcherObject
System.Windows..::..DependencyObject
System.Windows.Media..::..Visual
System.Windows..::..UIElement
System.Windows..::..FrameworkElement
System.Windows.Controls..::..Control
yWorks.Canvas..::..CanvasControl
yWorks.yFiles.UI..::..GraphControl