AccessibleObject.Navigate Method (AccessibleNavigation)


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


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.

Exception Condition

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
Available since 1.1
Return to top