Exemplo n.º 1
1
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            GraphViewer graphViewer = new GraphViewer();
            graphViewer.BindToPanel(Panel);
            Graph graph = new Graph();

            graph.AddEdge("A", "B");
            graph.Attr.LayerDirection = LayerDirection.LR;
            graphViewer.Graph = graph; // throws exception
        }
Exemplo n.º 2
0
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            ViewModel = new AutomatonViewModel();
            this.DataContext = ViewModel;

            graphViewer = new GraphViewer();
            graphViewer.BindToPanel(graphViewPanel);
        }