How to disabled the zooming funtionality to Group Panel

Hi ,

I am using GoXam library to draw the diagrams. My requirement is to disabled the zooming functionality of group panel but grouping objects(nodes) has to be zoom in/out horizontally and vertically.

Is there any property or functionality in GoXam?

Thanks in advanced

Sitaram K

I think the answer is “no”, but I’m not sure exactly what your requirements are. Could you post some before and after sketches or screenshots demonstrating what you want?

Please find the attached screen shot

Sitaram K

You could implement a DiagramPanel.ViewportBoundsChanged event handler to see if the DiagramPanel.Scale has changed. If it has, change the font size of the group’s TextBlock and the StrokeThickness of the group’s border.

My requirement is ,

Zoom in/out - no need to change the font size of the group’s TextBlock and the StrokeThickness of the group’s border, but other contents(inside) of the group has to be change

Is it possible to do?

Sitaram K

It seems to me that when the user zooms in or out, you want the contents of the group to be scaled in the normal fashion. It is only the group’s text and border around the GroupPanel that you do not want to scale along with the DiagramPanel.Scale. So it would be much less work to only modify the group’s visual tree’s elements than to try to modify all of the group’s member nodes and links.

Yes, Exactly what you said is expected.

But, how to do it.

Can you give me any idea or lines of code(work around)?

Sitaram K

How to do it is what I suggested in my second reply.

I haven’t tested this, but something like:

    myDiagram.TemplateApplied += (s, e) => {
        var oldscale = 1.0;
        myDiagram.Panel.ViewportBoundsChanged += (s, e) => {
            if (oldscale == myDiagram.Panel.Scale) return;
            oldscale = myDiagram.Panel.Scale;
            for (var g in myDiagram.Nodes.OfType<Group>()) {
                . . . modify each Group's elements the way that you want . . .