Hi,
There are lots of groups on my diagram.When user expand any of them, it is expanded within a grid control and innately its size grows up.After every expanding , I am organizing the groups on diagram with :
It works but there is a problem .When any group is expanded, the margins between groups grows and margin is as big as the new size of expanded group. It looks bad…
I just want to expand related group. The margin between the groups must be the same as defined in xaml. ( By the way I put the groups in a border and the margin iis defined in border. )
How can I solve this issue??
Thanks for the replies …
I’m not sure what you mean, but what you are doing is not the normal way to get the result that I think you want.
Instead, make sure that all layouts have Conditions=“Standard GroupSizeChanged”.
The standard conditions for a layout to be re-performed are adding or removing nodes or links.
Adding the “GroupSizeChanged” condition means that whenever a Group changes size, the layout containing that group will be invalidated and will soon be performed again.
It gives me an except at run time.It doesn’t giveme the error detail because it is an error in xaml .
There are groups in my diagram . When I expand a group , the size of group increases beacuse of the grid control which is shown in it. And the margins between groups increases very much. I want to expand the group which user expands, the other groups on the diagram should be shown with the same margins as described in xaml.
I hope I explain my problem this time…:(
With older versions for Silverlight, you need to say ConditionFlags="…".
But this should not be necessary with 1.3 and Silverlight 4, since Silverlight 4 improved its XAML implementation.
Hi Walter,
I haven't found any solution for my problem.I am sending my templated. There are 3 Group Templates which I used.
When user expands nodes which is decribed with GroupTemplate1, it expands related nodes in it which describced with GroupTemplate2, and hierarchically , when second nodes are expanded,
the nodes are shown which described with GroupTemplate2.
The picture shows how my program works. But I want it works as right side like showed.The margin Between nodes at Y axis , increases as much as the expanded nodes height. Out of the line which expanded nodes is on , other nodes on should be the same.How can I corecct this?
I updated the post Walter.
There is one more group which I didn’t show at picture (1. degree group ).When user expands it (1. degree group) , the groups in it(second degree groups) are expanded. (The biggest rectangle in picture represents the 2. degree group.) When user expands 2. degree groups, the third degree groups are expanded. Finally when user expand 3. degree groups , the nodes (not group) in it are expanded.
I am using for diagram layout after every expand - collapse :
Right, but I was asking how you declared the Diagram.Layout.
Is the Diagram.Layout a GridLayout? If so, you need to set its CellSize=“5 5” or something else small.
You shouldn’t need to invalidate layouts programmatically.
OK, so you are saying that the biggest rounded rectangle is from GroupTemplate2, right?
And it uses the Group.Layout that you just quoted?
When I try GridLayout with a small value for CellSize (and zeroes for the Spacing, to make it clearer), I get:
You can clearly see that the rows that have all short items in them are shorter than rows that have some tall items in them.
That’s what you wanted, yes?
Oh, what are the actual sizes for the big node and the smaller nodes inside the biggest group?
Hi Walter ,
Thank a lot for your time. I tried to do settings in your last post, and I realized that I misses Alignment=“Position” property in my design.It works as I want :). But there is one more problem I have. The nodes which can be seen at page when page loaded are showed regularly. But There are nodes which can not be seen without any scrool bar move .These nodes overlap on each other.
How can I solve this issue?
Thanks in advance…
I haven’t seen that bug. Can you reproduce it with any of the sample apps? Or can you tell me how to reproduce the bug in a separate app?
I’d also like to understand better what you are seeing. Consider just one “column” of overlapping nodes. Does it appear that it is the same node, but drawn multiple times? Or are they different nodes that happen to overlap each other?
Hi Walter , I have just put Alignment=“Position” property , and margin problem is solved.When I expand big one node( big node in picture ), the small nodes overlaps on each other as I said at last post. But When I expand any node (small nodes in picture), it work without any bug.Overlapping problem does not exist. Again When I collapse the expanded node it works well again…I mean , When the small nodes are loaded for the first time, they overlaps on each other.But when any of these small nodes are expanded or collapses , it works as it should be…Why can this problem happens ? Thanks very much for your time in advance…
I just tried a Diagram and a GroupTemplate (both using a GridLayout with the same Conditions) along with nested groups, including one that is nested three deep. Everything worked just as I believe you would have expected. But let me try some more cases.
I can reproduce the problem. Clearly it has something to do with Groups, and perhaps nested groups.
The problem does not happen if you use a different layout, such as:
<go:TreeLayout Conditions=“Standard GroupSizeChanged” />
However, you probably cannot use this alternative layout because you probably want to have more than one column.