Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Layout.FlowLayout.Arrange hang (Read 2896 times)
John Preston
YaBB Newbies
*
Offline


Lost Developer

Posts: 18
Joined: Mar 9th, 2011
Layout.FlowLayout.Arrange hang
Mar 17th, 2011 at 7:33pm
Print Post  
I've run into an issue using the Layout.FlowLayout.Arrange.

So at first it flatout wasn't working, and I'd get errors like those in this thread: http://mindfusion.eu/Forum/YaBB.pl?board=fcnet_brep;action=display;num=123970277...

After retooling a lot of our logic, I instead get a hang when calling the Arrange. I found a thread about it in the old Windows Forms version where it was fixed back in Oct 2008: http://mindfusion.eu/Forum/YaBB.pl?board=fcnet_disc;action=display;num=122452155...

Nothing on the forums here seems to allude to what is causing it. Is this a regression in the WPF version? Or am I doing something wrong?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layout.FlowLayout.Arrange hang
Reply #1 - Mar 17th, 2011 at 7:44pm
Print Post  
We are developing FlowLayout for a customer and it seems only they know with what kind of rules it works. Try using SwimlaneLayout or FlowchartLayout instead.
  
Back to top
 
IP Logged
 
John Preston
YaBB Newbies
*
Offline


Lost Developer

Posts: 18
Joined: Mar 9th, 2011
Re: Layout.FlowLayout.Arrange hang
Reply #2 - Mar 17th, 2011 at 9:34pm
Print Post  
Okay, trying FlowchartLayout gets me somewhat close to what I want. I've played around with every property I could think to try, but I can make it stop overlapping, or drawing otherwise weird links.

This is the code I'm using to try and acheive what I want.

Code
Select All
        dg.RoutingOptions.CrossingCost = 100
        dg.RoutingOptions.Anchoring = Anchoring.Ignore

        Dim fl As New Layout.SwimlaneLayout
        fl.Orientation = Layout.Orientation.Horizontal
        fl.NodeDistance = 15
        fl.Margins = Size.Empty
        fl.KeepGroupLayout = True

        fl.Arrange(dg)
        dg.ResizeToFitItems(5) 



Win Forms using FlowLayout:


WPF using FlowchartLayout:
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layout.FlowLayout.Arrange hang
Reply #3 - Mar 18th, 2011 at 1:06pm
Print Post  
You could call RouteAll to rearrange the links that FlowchartLayout cannot recognize:

Code
Select All
var fcl = new FlowchartLayout();
fcl.Orientation = MindFusion.Diagramming.Wpf.Layout.Orientation.Horizontal;
fcl.Arrange(diagram);

diagram.RoutingOptions.Anchoring = Anchoring.Reassign;
diagram.RouteAllLinks();
diagram.ResizeToFitItems(10); 



If you send to support@mindfusion.eu your FlowLayout setup code and the diagram xml file, our developer will check what happens there.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint