This documentation is archived and is not being maintained.

AccessibleObject.Navigate Method

Navigates to another accessible object.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[<SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)>]
abstract Navigate : 
        navdir:AccessibleNavigation -> AccessibleObject 
[<SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)>]
override Navigate : 
        navdir:AccessibleNavigation -> AccessibleObject 

Parameters

navdir
Type: System.Windows.Forms.AccessibleNavigation
One of the AccessibleNavigation values.

Return Value

Type: System.Windows.Forms.AccessibleObject
An AccessibleObject that represents one of the AccessibleNavigation values.

ExceptionCondition
COMException

The navigation attempt fails.

Navigation, both spatial and logical, is always restricted to the user interface elements within a container. With spatial navigation, clients can navigate only to a sibling of the starting object. Depending on the navigational flag used with logical navigation, clients can navigate to either a child or to a sibling of the starting object. This method does not change the selection or focus. To change the focus or to select an object, use Select. The Navigate method retrieves only user interface elements that have a defined screen location.

Notes to Inheritors

All visual objects must support this method. If an object has the state AccessibleStates.Invisible, navigation to this hidden object might fail. Some system-defined interface elements such as menus, menu items, and pop-up menus allow navigation to objects that are not visible. However, other system-defined user interface elements do not support this. If possible, servers should support navigation to objects that are not visible, but this support is not required and clients should not expect it.

The following example demonstrates the creation of an accessibility-aware chart control, using the AccessibleObject and Control.ControlAccessibleObject classes to expose accessible information. The control plots two curves along with a legend. The ChartControlAccessibleObject class, which derives from ControlAccessibleObject, is used in the CreateAccessibilityInstance method to provide custom accessible information for the chart control. Since the chart legend is not an actual Control -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the ChartControlAccessibleObject class overrides the GetChild method to return the CurveLegendAccessibleObject that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information.

This code demonstrates shows overriding the Navigate method. See the AccessibleObject class overview for the complete code example.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: