Page Index Toggle Pages: 1 [2] 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) form.Nodes.Count issue (Read 17621 times)
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: form.Nodes.Count issue
Reply #15 - Jan 13th, 2011 at 2:15pm
Print Post  
Hello Stoyan!!
Some news about new version?
Im waiting for last feature you coment the last time in this post.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #16 - Jan 13th, 2011 at 3:28pm
Print Post  
Hi,

We'll post the beta version next week.

Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: form.Nodes.Count issue
Reply #17 - Feb 4th, 2011 at 11:15am
Print Post  
Stoyo, this partially work


I create button, buttn is automatically called button 1,
When i copy and then paste, button continue called like button 1

But if save and lod, hat button pasted, is correctly called button 2 when load!

Why when i paste number not change to correct number? and only do when i save and load?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #18 - Feb 4th, 2011 at 1:05pm
Print Post  
Hi Pablo,

For copy/paste you must also handle the CopyHostedControl event. The handler should create a new instance of the control by calling the constructor - this will keep the correct binding expression from the original Xaml. Then you copy only the unbound property values you need from the original control; do not copy bound properties because that assigns a local value and removes the binding.

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: form.Nodes.Count issue
Reply #19 - Feb 4th, 2011 at 1:46pm
Print Post  
Sorry for request the same always, but if can paste working code example, i really apreciate a lot.
Best regards.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #20 - Feb 8th, 2011 at 12:33pm
Print Post  
E.g. add this to the previous example:

Code
Select All
void form_CopyHostedControl(object sender, CopyHostedControlEventArgs e)
{
	if (e.Source is Mybutton)
	{
		var destNode = Diagram.GetDiagramItem(e.Destination) as DiagramNodeAdapter;
		var button = new Mybutton();
		button.Text = ((Mybutton)e.Source).Text;
		destNode.Control = button;
	}
} 



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: form.Nodes.Count issue
Reply #21 - Feb 8th, 2011 at 10:22pm
Print Post  
Error1The type or namespace name 'CopyHostedControlEventArgs' could not be found (are you missing a using directive or an assembly reference?)

How set this method as CopyHostedControl handler in the Xaml ?

InitializeNode="form_InitializeNode"
NodePasted="form_NodePaste"
NodeDeleted="form_NodeDeleted"
NodeSelecting="form_NodeSelecting"
SerializeControl="form_SerializeControl"
DeserializeControl="form_DeserializeControl"


CopyHostedControl   ?


Please paste code.
Thankyou for your help.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #22 - Feb 9th, 2011 at 6:57am
Print Post  
I suppose the WpfDiagram reference is still pointing to the old version if you are getting this error. What assembly version can you see in the Properties window if you select the diagramming.wpf.dll reference in Solution Explorer?
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: form.Nodes.Count issue
Reply #23 - Feb 9th, 2011 at 10:45am
Print Post  
2.5.0.24250
Is very strange is older version.


In visual studio i deleted reference to diagramming.wpf.dll

I have the diagraming  dlls inside a folder of my project.

I deleted all that dlls , remplace by new.

Then reference again to new diagramming.wpf.dll file.

What im doing wrong?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #24 - Feb 9th, 2011 at 10:53am
Print Post  
Check the "Reference Paths" tab in the project properties window, there might be a path pointing to the older version. Also verify that the "Use specific version" property for the diagramming.wpf.dll reference is disabled.

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: form.Nodes.Count issue
Reply #25 - Feb 9th, 2011 at 11:41am
Print Post  
Yes this help!
Finally have working new beta !! : )
ANyway this not work when copy and paste something is wrong asap i can i upload and example.
I think is the best way to no make you loose lot of time on me : )

I find a big trouble using wpg and the new beta , http://wpg.codeplex.com/
WPG is a wpf property grid component.

With new beta 2.5.1 i have this error:

cold not load file or assembly 'WPG, public Token= Null'

This happen only when use WPG project with mindfusion.
On project without mindfusion no have any problem.


Some idea?
Can this be fixed?
« Last Edit: Feb 9th, 2011 at 11:18pm by PDM. »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #26 - Feb 10th, 2011 at 7:11am
Print Post  
If you are getting this when starting the project, check if you haven't disabled the "copy to output folder" property for the WPG reference while trying to update the diagram's references.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: form.Nodes.Count issue
Reply #27 - Feb 10th, 2011 at 11:08am
Print Post  
WHere is located "copy to output folder"

I clik over WPG reference and not see that property.


+            $exception      {"Could not load file or assembly 'WPG, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."}      System.Exception {System.Windows.Markup.XamlParseException}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #28 - Feb 10th, 2011 at 2:18pm
Print Post  
I meant "Copy Local". It looks as if the runtime cannot find the WPG assembly in the executable's folder when you run the app. Can you see the WPG assembly there (bin/debug or bin/release )?
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: form.Nodes.Count issue
Reply #29 - Feb 10th, 2011 at 8:36pm
Print Post  
Copy locla is configured to TRUE
dll not copied, that s the problem i copy mnually, but some idea why visual studio dont copy?
I know now this no is a problem of mindfusion, and never is after all, but if you have some possible answers, i apreciate a lot.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 
Send TopicPrint