Three question about Diagram

First,I try use the Diagram.Panel.CenterPart() Method,but i find it only accept one node to center.And i try use the Diagram.Panel.Make<SPAN =short_text lang=en id=result_>Visual() Method,but it accept one node too.

so,how can i center some nodes i selected.
second,If i want to implement a 'Marquee zoom center tool' how to do it??
third,I'm now still Doubt about Diagram.Panel.DiagramBounds, and Diagram.Panel.ViewerBounds, and the diffrent bettween Location and Position.How can i use them to Position the Diagram..
that's all thank you!

I thought I answered this question already: centering by setting DiagramPanel.Position.

You can generalize that code by replacing the use of DiagramPanel.DiagramBounds with whatever Rect that you want. For example, to try to center the selection:

DiagramPanel panel = myDiagram.Panel; Rect b = panel.ComputeBounds(myDiagram.Selection); Rect v = panel.ViewportBounds;<span ="highlight"></span> panel.Position = new Point(b.X+b.Width/2-v.Width/2, b.Y+b.Height/2-v.Height/2);
To implement a marquee zoom center tool, inherit from DragSelectingTool and override the SelectInRect method to execute the above code, but using the argument Rect as the value for the “b” variable.

You might want to read the GoXamIntro about the different properties. Also it might help to read about IScrollInfo, which DiagramPanel implements. (It’s in the System.Windows.Controls.Primitives namespace.)