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 }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { ViewModel = new AutomatonViewModel(); this.DataContext = ViewModel; graphViewer = new GraphViewer(); graphViewer.BindToPanel(graphViewPanel); }