Version

Configuring the Navigation Pane (xamDiagram)

Topic Overview

Purpose

This topic explains how to configure the Navigation pane of the xamDiagram™ control.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides a conceptual overview of the xamDiagram control and its main features and capabilities.

This topic provides an overview of the visual elements of the xamDiagram control.

This topic explains how to add the xamDiagram control to a WPF application.

Introduction

Navigation pane configuration summary

The xamDiagram control has the capability to display a reduced-size overview of its full content in a separate pane positioned inside the diagram space, by default at its bottom-right corner.

xamDiagram Configuring The Overview Pane 1.png

This feature comes handy when a diagram is displayed only partially in the diagram space due to its current zoom settings or sheer size. In addition to that, the Navigation pane allows users to navigate and change the zoom level of the diagram by an interaction with its UI.

The Navigation pane is implemented as a separate control – xamOverviewPlusDetailPane™ – which is embedded in xamDiagram .

The visibility (shown/hidden) and the position of the Navigation pane on the diagram space are configurable. They are managed with properties that belong to the xamDiagram control. By default, the Navigation pane is not displayed but, if visibility is enabled (NavigationPaneVisibility = “Visible”), it will be shown at the bottom-right corner of the diagram space (this is the default positioning). The position of the Navigation pane within the diagram space is configurable by specifying the horizontal and vertical alignment of xamOverviewPlusDetailPane through a couple of alignment properties.

The diagram’s internal instance of the xamOverviewPlusDetailPane control can be accessed via the XamDiagram.NavigationPane property and can be further customized through the properties of xamOverviewPlusDetailPane . For example, the default size of the Navigation pane is 220 px wide and 150 px high, but it can be changed to any desired dimensions with the Width and Height properties of xamOverviewPlusDetailPane , (For information on all xamOverviewPlusDetailPane properties that can be configured, see the XamOverviewPlusDetailPane class members.)

Navigation pane configuration summary chart

The following table explains briefly the configurable aspects of the navigation pane of the diagram and maps them to the properties that manage them. The aspects highlighted in green are covered in detail after this summary table.

Configurable aspect Details Properties

The Overview pane can be visible or hidden.

Horizontal

The horizontal positioning of the navigation pane is achieved by choosing from 3 alignment positions: left, right, and centered. Alternatively, the pane can also be displayed as stretching horizontally between the left and right edges of the diagram space (“stretch” alignment).

Vertical

The vertical positioning of the navigation pane is achieved by choosing from 3 alignment positions: top, bottom, and centered. Alternatively, the pane can also be displayed as stretching vertically between the top and bottom edges of the diagram space (“stretch” alignment).

Configuring the Visibility of the Navigation Pane

Overview

The visibility (shown/hidden) of the Navigation pane is managed with NavigationPaneVisibility property. The valid settings are:

  • “Hidden”

  • “Visible”

  • “Collapsed”

By default, the Navigation pane is collapsed.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Hide the Navigation pane

  • “Hidden” or “Collapsed”

Show the Navigation pane

  • “Visible

Example

The screenshot below demonstrates how the diagram would look as a result of the following settings:

Property Value

“Visible”

xamDiagram Configuring The Overview Pane 1.png

Following is the code that implements this example.

In XAML:

<ig:XamDiagram Width="350"
               Height="350"
               Background="#F9F9F9"
               NavigationPaneVisibility="Visible">
<ig:DiagramNode Key="node0" Position="45,55"/>
<ig:DiagramNode Key="node1" Position="200,120"/>
<ig:DiagramConnection StartNodeKey="node0"
                      EndNodeKey="node1"/>
</ig:XamDiagram>

Configuring the Position of the Navigation Pane

Overview

The position of the Navigation pane on the diagram space is achieved as combination of its horizontal and vertical alignment, each managed with a separate property ( NavigationPaneHorizontalAlignment and NavigationPaneVerticalAlignment).

In addition to using the respective alignment values ( “Left” , “Right” , “Top” , “Bottom” , “Center” ), the position can be configured also by setting the respective alignment property to “Stretch” .

Note
Note:

If the respective dimensioning property (Height / Width) of xamOverviewPlusDetailPane has been explicitly set (the default case with an embedded Navigation pane), the “Stretch” value of the related alignment property will work as “Center” .

Property settings

The following table maps the desired configuration to the property settings that manage it. For a stretched layout, the respective dimensioning property of the xamOverviewPlusDetailPane control (Height or Width) must not be set.

In order to position the Navigation pane: Use this property: And set it to:

Top-left

“Left”

“Top”

Top-center

NavigationPaneHorizontalAlignment

“Center”

NavigationPaneVerticalAlignment

“Top”

Top-right

NavigationPaneHorizontalAlignment

“Right”

NavigationPaneVerticalAlignment

“Top”

Center-left

NavigationPaneHorizontalAlignment

“Left”

NavigationPaneVerticalAlignment

“Center”

In the middle

NavigationPaneHorizontalAlignment

“Center”

NavigationPaneVerticalAlignment

“Center”

Center-right

NavigationPaneHorizontalAlignment

“Right”

NavigationPaneVerticalAlignment

“Center”

Bottom-left

NavigationPaneHorizontalAlignment

“Left”

NavigationPaneVerticalAlignment

“Bottom”

Bottom-center

HorizontalAlignment

“Center”

NavigationPaneVerticalAlignment

“Bottom”

Bottom-right

NavigationPaneHorizontalAlignment

“Right”

NavigationPaneVerticalAlignment

“Bottom”

Stretched horizontally at top

NavigationPaneHorizontalAlignment

“Stretch”

NavigationPaneVerticalAlignment

“Top”

Stretched horizontally at middle

NavigationPaneHorizontalAlignment

“Stretch”

NavigationPaneVerticalAlignment

“Center”

Stretched horizontally at bottom

NavigationPaneHorizontalAlignment

“Stretch”

NavigationPaneVerticalAlignment

“Bottom”

Stretched vertically at left

NavigationPaneHorizontalAlignment

“Left”

NavigationPaneVerticalAlignment

“Stretch”

Stretched vertically at middle

NavigationPaneHorizontalAlignment

“Center”

NavigationPaneVerticalAlignment

“Stretch”

Stretched vertically at right

NavigationPaneHorizontalAlignment

“Right”

Example

The screenshot below demonstrates how the diagram looks as a result of the following settings:

xamDiagram Configuring The Overview Pane 3.png

Following is the code that implements this example.

In XAML:

<ig:XamDiagram x:Name="diagram"
               Width="370"
               Height="370"
               Background="#F9F9F9"
               NavigationPaneVisibility="Visible"
               NavigationPaneHorizontalAlignment="Left"
               NavigationPaneVerticalAlignment="Top">
<ig:DiagramNode Key="node0" Position="140,140"/>
<ig:DiagramNode Key="node1" Position="250,250"/>
<ig:DiagramConnection StartNodeKey="node0"
                      EndNodeKey="node1"/>
</ig:XamDiagram>

Related Content

Resources

The following material (available outside the Infragistics family of content) provides additional information related to this topic.

Topic Purpose

An MSDN article Indicating where an element should be displayed on the horizontal axis relative to the allocated layout slot of the parent element. (Relevant for the behavior of the “Stretch” setting of the alignment properties.)