A control for displaying and editing an IGraph.

Namespace: yWorks.yFiles.UI
Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 2.4.0.0

Syntax

C#
public class GraphControl : CanvasControl
Visual Basic
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):

By default, these commands are enabled and bind to the respective methods implemented by this class.

The following commands are bound to methods implemented by this class, but are disabled by default:

To enable these command, set the FileOperationsEnabled dependency property to trueTruetruetrue (True in Visual Basic).

In addition to that this class declares the following new RoutedUICommands.

The ZoomToCurrentItemCommand is enabled, if NavigationCommandsEnabled is trueTruetruetrue (True in Visual Basic). All of these commands can be removed from the CommandBindings collection if necessary.

Related Reading in the Developer's Guide

The controls that can be used to display and edit a model are discussed in the section View Implementations.

Related Demo Applications

The following programming samples are available: Also see the yFiles for Silverlight tutorials for step by step introductions.

Inheritance Hierarchy

System..::..Object
  System.Windows..::..DependencyObject
    System.Windows..::..UIElement
      System.Windows..::..FrameworkElement
        System.Windows.Controls..::..Control
          yWorks.Canvas..::..CanvasControl
            yWorks.yFiles.UI..::..GraphControl

See Also