Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Align line helpers, how enable? are available? (Read 12023 times)
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Align line helpers, how enable? are available?
Aug 30th, 2011 at 8:01am
Print Post  
I see in lot of diagram programs when you drag a node, very thin line appear in the bodrerfor help to align with other nodes alreadye xist in the diagram.

No idea how explain this, but basically are lines appear in borer of nodes, when you move the node trough similar position of other nodes, when node pass fromhorizontal or vertical align, then line appear indicating that bordr is aligned with the other node, and you can use for guide to align the node you are moving.

Exist that mindfusion diagram?

Best regards!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Align line helpers, how enable? are available?
Reply #1 - Aug 30th, 2011 at 8:17am
Print Post  
Hi,

At this time only the Ruler control provides alignment guides. Set the EnableGuides property to enable them, and then you can start dragging on one of the ruler scales to get either horizontal or vertical guides with which to align nodes.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #2 - Aug 30th, 2011 at 10:43am
Print Post  
Hi Stoyo, how can "Set the EnableGuides property" ?

Please can shw some example?

I search all the forum and not se any reference to enableguides

best regards.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Align line helpers, how enable? are available?
Reply #3 - Aug 30th, 2011 at 11:27am
Print Post  
Hi Pablo,

You will have to place the diagram inside a Ruler control instead of ScrollViewer, and then set EnableGuides="true" in the Xaml for the Ruler element.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #4 - Aug 30th, 2011 at 3:03pm
Print Post  
Really be nice implement waht i comment is better tool than ruler : )

Ruker no is usefull for me.

Best regards!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Align line helpers, how enable? are available?
Reply #5 - Sep 5th, 2011 at 1:44pm
Print Post  
This implements something similar to how the VS2010 designer lets you align a control to other controls on the form:
https://mindfusion.eu/_beta/wpfdiag_align.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #6 - Sep 6th, 2011 at 5:08pm
Print Post  
Jajja, Mindfusion team is just awesome !!
Excelent work guys tahnkyou for add this simple nice and usefull feature!!
This is the reason due i payed my licence for use this component, mindfusion team is just awesome.

One question, how change the color of the blue line align?

Also if exist other properties for the align line please inform.

I think i see a little bug on this new feature.


This is really little bug, if you drag a node with mouse to desired position align position, the blue line is showed, after you move the node to deired position if you move the node with arrow keys, the align blue line not disapear after move teh ndoe with keys.
Is a minot bug but little ugly, or probably no is a bug and i have to add soemthing to my keyboard move, for make blue align line disapear?

   form.CommandBindings.Add(new CommandBinding(Diagram.NavigateRight, (sender, args) =>
       {
           DiagramNode node = form.ActiveItem as DiagramNode;
           if (node != null)
           foreach (DiagramNode SelectedNode in  form.Selection.Nodes)
           SelectedNode.Move(SelectedNode.Bounds.X + 1, SelectedNode.Bounds.Y); 
        }));

           form.CommandBindings.Add(new CommandBinding(Diagram.NavigateLeft, (sender, args) =>
           {   
               DiagramNode node = form.ActiveItem as DiagramNode;
               if (node != null)
                   foreach (DiagramNode SelectedNode in form.Selection.Nodes)
                   SelectedNode.Move(SelectedNode.Bounds.X - 1, SelectedNode.Bounds.Y);      
           }));

           form.CommandBindings.Add(new CommandBinding(Diagram.NavigateUp, (sender, args) =>
           {
               DiagramNode node = form.ActiveItem as DiagramNode;
               if (node != null)
                   foreach (DiagramNode SelectedNode in form.Selection.Nodes)
                   SelectedNode.Move(SelectedNode.Bounds.X, SelectedNode.Bounds.Y - 1);

           }));

           form.CommandBindings.Add(new CommandBinding(Diagram.NavigateDown, (sender, args) =>
           {
               DiagramNode node =  form.ActiveItem as DiagramNode;
               if (node != null)
                   foreach (DiagramNode SelectedNode in form.Selection.Nodes)
                   SelectedNode.Move(SelectedNode.Bounds.X, SelectedNode.Bounds.Y + 1);
              
           }));


Best regards!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Align line helpers, how enable? are available?
Reply #7 - Sep 6th, 2011 at 5:35pm
Print Post  
Smiley We have already added AlignmentGuidePen, AutoAlignDistance and bool AutoAlignNodes properties for the official version (not available in your build). We should release it next week.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #8 - Sep 6th, 2011 at 5:39pm
Print Post  
Now i cant sleep waiting the next week arrive !!jajaj   Grin
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #9 - Sep 6th, 2011 at 5:48pm
Print Post  
One mor elittle comment, i i select multiple nodes, the align lines not work.
That will be fixed next week?

Best regards!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Align line helpers, how enable? are available?
Reply #10 - Sep 7th, 2011 at 8:31am
Print Post  
Hi Pablo,

Please try this build, it should work with multiple selection too:
https://mindfusion.eu/_beta/wpfdiag_alignmultisel.zip

Now you must set AutoAlignNodes = true to enable this feature.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #11 - Sep 7th, 2011 at 12:35pm
Print Post  
Very strange Autoalign, no exist.
I downlaoded thsi new release, delete mindfusion references, loaded again, rebuild the solution, and have message autoalign no exist.

I try:

form.AutoAlignNodes = true
AutoAlignNodes = true
  and try in xml, and not appear.

Stoyo, anyway no problem i really can wait to the next week, im just kidding with my previous comment i cnat wait   Grin


I can wait to the next week for have this feature, please dont forgot add option for change color, and add option for show autoalign when keyboard is used for align the nodes.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #12 - Sep 8th, 2011 at 5:35am
Print Post  
I see a new problem:

When node is rotated, align not work more for the rotated node!

Best regards!
« Last Edit: Sep 8th, 2011 at 12:26pm by PDM. »  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #13 - Sep 8th, 2011 at 12:30pm
Print Post  
I add a correction to my last comment, if node rotated is a simetric shape, example square, align lines work correcly, if node is a non regular polygon, example rectangle, lines for align not work corectly.

Hoppe this now is more clear.

Best regards!
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Align line helpers, how enable? are available?
Reply #14 - Sep 16th, 2011 at 2:12pm
Print Post  
Hi Stoyo, is the new version released?

Best regards.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint