Change size of a Node


I want that the user have the possibility to change the size of a node on the one hand via mouse and on the other hand via a designer. In the designer, the user should enter the desired height and width of the node. Afterwards the values are changed in the node via databinding. Both methods works great for there own. Have a look at following code fragment in XAML:
If I change the size via the designer it works great. But if I once change the size of the node via the mouse, and so far the SizeChanged-event is fired, indeed the size is changed, but afterwards all changes via designer are ignored.
Whats wrong?

First, if you are using the ResizingTool by setting go:Part.Resizable=“True”, I hope your template’s root element includes go:Part.SelectionElementName=“Shape”, so that that shape gets resize handles and is the actual element that whose Width and Height are changed. Otherwise it is the root element that is resized, which won’t change the Width and Height of that Path shape. It seems you have done that – I just mention this to make sure other readers of this topic are aware.

Because interactive resizing will be setting the Width and Height, as well as getting initial and updated values from your data properties, your data-bindings really ought to be Mode=TwoWay. Once you do this, because the two data properties are being updated, the corresponding TextBoxes (or whatever controls you are using) will be updated automatically in your designer.

Could you please tell how can i change the size of node with mouse?

I think my earlier reply in this thread says it all. Could you be more specific about why the standard behavior isn’t doing what you want?

My client wants the functionality to resize the node panel by using mouse. How can i do that? Please elaborate…

There are examples of this in the Demo. Perhaps the EntityRelationship sample is like what you want.

There’s also a section about “Resizing” in the GoXamIntro.pdf.

If you are resizing a Panel and it’s not behaving the way you want, you probably need to adjust its definition so that it responds to the setting of Width and Height, which is what the ResizingTool does. That’s not really specific to GoXam – you can read about WPF or Silverlight layout in various books or online web sites.

Could you show what you have tried and describe what it’s doing that isn’t what you want?

When i am resizing the node panel then only outer panel is expanding but the inner panel remains constant. See the below screenshot:

Here is the code:

I want to expand the inner panel too. How can i do that?

I think you want to use go:NodePanel.Sizing=“Fixed”.

“Fixed” means that the NodePanel’s first child element can and should have its Width and Height set.

“Auto” means that it is automatically sized to fit around the other child elements.

Thanks a lot