Page Index Toggle Pages: 1 2 [3] 4 5  Send TopicPrint
Very Hot Topic (More than 25 Replies) Starting with a Default Node (Read 39466 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Starting with a Default Node
Reply #30 - Jul 1st, 2011 at 11:07am
Print Post  
You might enable AllowUnconnectedLinks to get LinkCreating raised continuously, and then initialize the link from the first LinkCreating event raised for it. Set e.Cancel = true if e.Destination is null to prevent the user from actually drawing unconnected links.

Regards,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Starting with a Default Node
Reply #31 - Jul 15th, 2011 at 8:16am
Print Post  
Cell tooltips should work with this version:
https://mindfusion.eu/_temp/wpfdiag_celltips.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Pontius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 51
Joined: May 13th, 2011
Re: Starting with a Default Node
Reply #32 - Jul 21st, 2011 at 1:12pm
Print Post  
Thanks Stoyo for your prompt solution!

How can I use these files?
I have copied them to the folder where the old files are and replaced these.

I also deleted the reference to Mindfusion.Diagramming.Wpf and creaated it new.

But now I get a compilation error: File or assembly not found (german text...) which refers to the old one that was replaced.
In  the folder there ist still the old Mindfusion.Diagramming.Wpf.xml left.

Do you  know how to resolve this?

Regards,
Pontius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Starting with a Default Node
Reply #33 - Jul 21st, 2011 at 4:29pm
Print Post  
Expand the References branch under Solution Explorer and select the mindfusion.* assemblies. Now look in the properties window and make sure the "Use specific version" property is set to false for them. Or perhaps just remove the references and add them anew using the new assemblies.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Pontius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 51
Joined: May 13th, 2011
Re: Starting with a Default Node
Reply #34 - Jul 21st, 2011 at 5:21pm
Print Post  
That is exactly what I did.
In the properties window of the mindfusion... Reference I see the new version 2.6.0.25738 and Specific Version set to false.

But when compiling I still get the error that Version=2.5.2.32852 or a dependency was not found.
(HRESULT=0x80131515)

Regards
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Starting with a Default Node
Reply #35 - Jul 21st, 2011 at 5:24pm
Print Post  
If the message is shown coming from LC.EXE, edit licenses.licx and set PublicKeyToken=null; then it should work for any version. Or delete the file and it should be generated next time you rebuild.
  
Back to top
 
IP Logged
 
Pontius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 51
Joined: May 13th, 2011
Re: Starting with a Default Node
Reply #36 - Aug 12th, 2011 at 4:10pm
Print Post  
In order to get the LinkCreating Event raised contineously I set the diagram property AllowUnconnectedLinks = true. (See above.)

Now the DiagramLink doesn't snap to the AnchorPoints of myTalbeNode class anymore. The myTableNode class has the property SnapToAnchor = OnCreateOrModify.

Btw I use the diagram property AllowUnAnchoredLinks = false.
Regards
  
Back to top
 
IP Logged
 
Pontius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 51
Joined: May 13th, 2011
Re: Starting with a Default Node
Reply #37 - Aug 12th, 2011 at 4:48pm
Print Post  
I see now that the behavior described above may be caused by my implementation of the diagram_ValidateAnchorPoint_Event.

But a new problem:
I have a myTableNode class with two rows that contain one AnchorPoint each, a red AnchorPoints in the upper row and a blue AnchorPoints in the lower one. The Colors are stored in the AnchorPoint.Tag and I want to initialize the DiagramLink with the appropriate color of the AnchorPoint when creating a link.

I have the diagram property SnapToAnchor = OnCreateOrModify and I use the diagram_LinkCreating event to transport the color from the AnchorPoint.Tag to the DiagramLink.Stroke.

When creating a link by dragging the mouse inside the myTableNode the Links origin already snaps lets say to the blue lower AnchorPoint without raising the
diagram_LinkCreating event. When I now accidentally pass the upper red AnchorPoint while I am leaving the myTableNode the diagram_LinkCreating is raised the first time with a MousePosition pointing to the wrong red AnchorPoint. (My Link has already snapped to the blue AnchorPoint before.)
In the end of the day the diagram_LinkCreating event serves the wrong color and I have a red link connected to a blue AnchorPoint.

I need an event that is raised by the time the SnapToAnchor property takes action so that I am able to identify the AnchorPoint where the link has snapped to.

Do you see a chance to control that?
Regards,
Pontius
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Starting with a Default Node
Reply #38 - Aug 13th, 2011 at 10:45am
Print Post  
What's your criteria for changing the link's color - is it based on the link's origin or destination? For instance, if you link two tables and the link starts from a red anchor and ends to a blue anchor, what color would you assign to it?

Regards,
Meppy
  
Back to top
 
IP Logged
 
Pontius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 51
Joined: May 13th, 2011
Re: Starting with a Default Node
Reply #39 - Aug 14th, 2011 at 9:01pm
Print Post  
@Meppy
I must forbid links between different colors. If the link starts from a red anchor I must set the link's stroke to red and allow only connections to red destination anchors.

Example:
I always link cells of TableNodes. There may be a TabelNode with 10 outgoing anchors, 7 red and 3 blue. The second TablNode may have 10 incoming anchors, 4 red and 6 blue. It is allowed to connect each of the 7 outgoing red anchors of the first TableNode to each of the 4 incoming red anchors of the second TableNode. But not to one of the 6 blue incoming anchors.

Regards,
Pontius
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Starting with a Default Node
Reply #40 - Aug 15th, 2011 at 6:51am
Print Post  
Try this sample and see if it does what you need:

https://mindfusion.eu/_samples/_sample_WpfDiagram.zip

Regards,
Meppy
  
Back to top
 
IP Logged
 
Pontius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 51
Joined: May 13th, 2011
Re: Starting with a Default Node
Reply #41 - Aug 17th, 2011 at 4:55pm
Print Post  
Thanks Meppy,

Thanks for your help. It works the way I want to use it.

When I remove a DiagramLink and create it later on again in the MyTableNode via
Parent.Factory.CreateDiagramLink(oldLink.Origin, this)
the link somatimes has a different shape.

Before:
______
|______

After:
______|\
\____
It has some diagonal segments.
Do you know why?
How can I recreate a link with the same shape as before?

Regards,
Pontius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Starting with a Default Node
Reply #42 - Aug 18th, 2011 at 5:09am
Print Post  
I think diagonal segments are created by GridRouter when routing polyline links. So perhaps the new link's Shape is set to Polyline while the old one was Cascading?

If you need to replicate the exact shape of a link, you could copy the ControlPoints collection from the old link to the new one and call UpdateFromPoints(false, true).

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Pontius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 51
Joined: May 13th, 2011
Re: Starting with a Default Node
Reply #43 - Aug 19th, 2011 at 10:22am
Print Post  
My links always have the PolyLine Shape never Cascading. I do not change the Shape.
The diagonal segments always appear wether I use the GridRouter or the QuickRouter.

I recreate the links after a user interaction where the number and position of AnchorPoints of the TableNodes may have changed. That's why I can not create the links by reusing old ControlPoints.

Original A:


After programmatically recreated:


Original B:


After programmatically recreated:


In both simple cases above the AnchorPoints have stayed the same. So the result afer recreating the DiagramLinks programmatically should be the same too I think.

There are also problems with LinksCrossing.Arrow.
Sometimes there are no Arrows where there should be Arrows:


Somtimes Arrows reside while the other crossing DiagramLink was removed:


Regards,
Pontius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Starting with a Default Node
Reply #44 - Aug 19th, 2011 at 11:28am
Print Post  
It looks as if you are moving the link's end points or the node after calling Route(); in both pictures it seems the link's end was moved to the anchor point below after routing is applied. Does the diagonal segment remain if you call RouteAllLinks() in the end?

What exactly are you doing to get the missing crossing indicators? You can force them to repaint by setting LinkCrossings to None and back to Arcs.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 4 5 
Send TopicPrint