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.
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.)