<ig:XamNetworkNode.NavigationSettings> <ig:NavigationSettings AllowPan="True" AllowZoom="True" /> </ig:XamNetworkNode.NavigationSettings>
The purpose of this document is to describe how to navigate with mouse and keyboard for moving the NetworkNode within the view portal.
The following sections of navigation the xamNetworkNode control within view portal are:
The table below lists the prerequisites for this topic.
Pan and Zoom settings, as shown here are optional. They are enabled by default.
In XAML:
<ig:XamNetworkNode.NavigationSettings> <ig:NavigationSettings AllowPan="True" AllowZoom="True" /> </ig:XamNetworkNode.NavigationSettings>
In C#:
xnn.NavigationSettings.AllowPan = true; xnn.NavigationSettings.AllowZoom = true;
In Visual Basic:
xnn.NavigationSettings.AllowPan = True xnn.NavigationSettings.AllowZoom = True
The xamNetworkNode control supports mouse and keyboard navigation to zoom and pan the control within the view. Programmatic navigation is possible by calling the WindowsRect method of the control. Keyboard navigation commands with the associated key combinations are defined in the sections below.
To programmatically navigate the NetworkNode, you can use the WindowRect method. The zoom location is based on the coordinates passed parameters to the method. For example the code example below demonstrates how to zoom in on a node. The parameters for the method are the X coordinate, Y coordinate, Width, and Height of the node. Only the X coordinate is modified here to move the NetworkNode along the X axis.
Note: If the only Width and Height values are manipulated the view port will also zoom against the control.
In C#:
xnn.WindowRect = new Rect(xnn.WindowRect.X + 100, xnn.WindowRect.Y, xnn.WindowRect.Width, xnn.WindowRect.Height);
In VB:
xnn.WindowRect = New Rect(xnn.WindowRect.X + 100, xnn.WindowRect.Y, xnn.WindowRect.Width, xnn.WindowRect.Height)