Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ControlNode Button (Read 1441 times)
educosta
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Nov 5th, 2009
ControlNode Button
Mar 9th, 2010 at 1:46pm
Print Post  
I want create a ControlNode button, the problem is that i can't resize the node in the diagram
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ControlNode Button
Reply #1 - Mar 9th, 2010 at 2:59pm
Print Post  
Do you mean you can't select the button to resize it? That happens because the button captures the mouse, and we haven't found a way to detect the click in such case. As a workaround you could select the node programatically from a button.Click handler:

Code
Select All
var button = new Button();
button.Click += button_Click;
diagram.Nodes.Add(new ControlNode(diagram, button));

void button_Click(object sender, RoutedEventArgs e)
{
	var nodeCanvas = ((Button)sender).Parent as Canvas;
	var node = nodeCanvas.Parent as ControlNode;
	node.Selected = true;
} 



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