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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #30 - Feb 11th, 2011 at 11:19am
Print Post  
Have you perhaps added it to the GAC recently? I think GAC assemblies are not copied to the output folder by default.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #31 - Feb 11th, 2011 at 11:25am
Print Post  
... though the runtime should be able to load it from the GAC in that case.
  
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 #32 - Feb 11th, 2011 at 12:54pm
Print Post  
Absolutly thankyou !!
Finally fixed!
  
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 #33 - Feb 21st, 2011 at 2:21pm
Print Post  
Copy paste 2.5.1 not work at all.
Is very strange, when i copy and paste, the object not are copied with original colors and propertys, but if i save  and open, node object is showed correctly.

Can take a look on this?

Want i upload an exaple for better reference to the toruble?

Probably is soemthing im doing wrong.

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 #34 - Feb 21st, 2011 at 9:04pm
Print Post  
You are handling CopyHostedControl to avoid losing the Xaml binding expressions, right? Now you'll have to copy yourself the color properties from the event handler; the standard copy/paste code through XamlWriter/XamlReader does not run when you handle that event.
  
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 #35 - Feb 21st, 2011 at 9:40pm
Print Post  
Yes im hanlding CopyHostedControl, for that reaosn think is a bug.

Can take a look, or want i upload example?
  
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 #36 - Feb 22nd, 2011 at 7:47am
Print Post  
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;


button.Stroke = ((MyButton)e.Source).Stroke;


destNode.Control = button;


}

}

And not work object is copied, but stroke showed in blank, no text showed.
When i save and load again object show correct text and color in stroke

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 #37 - Feb 22nd, 2011 at 9:27am
Print Post  
It looks ok, are you sure you are not resetting the values later? for example in the NodePasted event handler.
  
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 #38 - Feb 22nd, 2011 at 9:51am
Print Post  
Hi again, i removed all code from NodePasted, and see the problem continue.

One question

void form_CopyHostedControl(object sender, CopyHostedControlEventArgs e)

Event is fired automatically when node is pasted? or have to add some line of code for fire the event?
In that case what is?
Probably is that what i forgot : )
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: form.Nodes.Count issue
Reply #39 - Feb 22nd, 2011 at 10:59am
Print Post  
Hi,

You must set form_CopyHostedControl as a handler of the CopyHostedControl event, add this to the Diagram element in the Xaml file:

CopyHostedControl="form_CopyHostedControl"

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 #40 - Feb 22nd, 2011 at 11:23am
Print Post  
Thankyou!
Finally work!   Tongue
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint