setting OverlapRemovalAlgorithmType programmatically fails

Feb 4, 2010 at 1:32 AM
Edited Feb 4, 2010 at 1:33 AM

exception raised at third line:


var gL = new GraphLayout<object,IEdge<object>,IBidirectionalGraph<object,IEdge<object>>>();
gL.LayoutAlgorithmType = "FR"; gL.OverlapRemovalAlgorithmType = "FSA"; gL.HighlightAlgorithmType = "Simple";



System.ArgumentOutOfRangeException was unhandled
  Message="Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"
       at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at GraphSharp.Controls.GraphLayout`3.ChangeState(Int32 stateIndex)
       at GraphSharp.Controls.GraphLayout`3.RecalculateOverlapRemoval()
       at GraphSharp.Controls.GraphLayout`3.OverlapRemovalAlgorithmType_PropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

Feb 22, 2010 at 4:27 PM

Yes, I see the same issue, even when using OverlapRemovalAlgorithmType in XAML, as per the tutorial example.

Feb 22, 2010 at 7:38 PM

Incidentally, my workaround for this was to wrap this assignment with a try...catch and ignore the exception.  So far, I've been able to get away with that, but I don't know what I'm missing out on algorithmically.  :)

Feb 22, 2010 at 7:56 PM

With this issue, are you using the downloadable binaries of graph# or are have you compiled the latest src?

Feb 22, 2010 at 7:58 PM

I downloaded from SVN yesterday and tried and got the same results.

Feb 23, 2010 at 10:25 AM

Please, opne a ticket in the issue traker of the project.


Thank you