QueryAccessibilityHelpEventArgs QueryAccessibilityHelpEventArgs QueryAccessibilityHelpEventArgs QueryAccessibilityHelpEventArgs Class

定义

QueryAccessibilityHelp 事件提供数据。Provides data for the QueryAccessibilityHelp event.

public ref class QueryAccessibilityHelpEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class QueryAccessibilityHelpEventArgs : EventArgs
type QueryAccessibilityHelpEventArgs = class
    inherit EventArgs
Public Class QueryAccessibilityHelpEventArgs
Inherits EventArgs
继承
QueryAccessibilityHelpEventArgsQueryAccessibilityHelpEventArgsQueryAccessibilityHelpEventArgsQueryAccessibilityHelpEventArgs
属性

示例

下面的代码示例演示如何创建一个具有辅助功能的图表控件,并使用AccessibleObjectControl.ControlAccessibleObject类,以公开访问的信息。The following code 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. ChartControlAccessibleObject类,该类派生自ControlAccessibleObject,在使用CreateAccessibilityInstance方法以提供自定义访问图表控件的信息。The ChartControlAccessibleObject class, which derives from ControlAccessibleObject, is used in the CreateAccessibilityInstance method to provide custom accessible information for the chart control. 因为不是实际图表图例Control-基于控制,但改为绘制由图表控件,它不提供任何内置的可访问信息。Because the chart legend is not an actual Control-based control, but instead is drawn by the chart control, it does not any built-in accessible information. 因此,ChartControlAccessibleObject类将重写GetChild方法以返回CurveLegendAccessibleObject,它表示每个部分的图例可访问信息。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.

此示例演示如何使用QueryAccessibilityHelpEventArgs类的QueryAccessibilityHelp事件。This example demonstrates using the QueryAccessibilityHelpEventArgs class with the QueryAccessibilityHelp event. 请参阅AccessibleObject完整的代码示例的类概述。See the AccessibleObject class overview for the complete code example.

// Handles the QueryAccessibilityHelp event.
void ChartControl_QueryAccessibilityHelp( Object^ /*sender*/, System::Windows::Forms::QueryAccessibilityHelpEventArgs^ e )
{
   e->HelpString = "Displays chart data";
}
// Handles the QueryAccessibilityHelp event.
private void ChartControl_QueryAccessibilityHelp(object sender, 
                            System.Windows.Forms.QueryAccessibilityHelpEventArgs e)
{            
    e.HelpString = "Displays chart data";
}          
' Handle the QueryAccessibilityHelp event.
Private Sub ChartControl_QueryAccessibilityHelp(sender As Object, _
                   e As System.Windows.Forms.QueryAccessibilityHelpEventArgs) Handles MyBase.QueryAccessibilityHelp
    e.HelpString = "Displays chart data"
End Sub 

注解

Control类公开一个公共QueryAccessibilityHelp事件。The Control class exposes a public QueryAccessibilityHelp event. 可以使用的属性QueryAccessibilityHelpEventArgs类以返回到可以访问客户端,如屏幕读取器的特定控件的自定义帮助。You can use the properties of the QueryAccessibilityHelpEventArgs class to return custom help for a particular control to an accessible client, such as a screen reader. 当处理QueryAccessibilityHelp事件,必须设置的值HelpNamespaceHelpKeyword,和HelpString为适当的值的属性。When you handle the QueryAccessibilityHelp event, you must set the values of the HelpNamespace, HelpKeyword, and HelpString properties to appropriate values.

备注

HelpKeyword属性应为字符串表示形式的数字的帮助主题 id。The HelpKeyword property should be a string representation of a numeric Help topic ID.

构造函数

QueryAccessibilityHelpEventArgs() QueryAccessibilityHelpEventArgs() QueryAccessibilityHelpEventArgs() QueryAccessibilityHelpEventArgs()

初始化 QueryAccessibilityHelpEventArgs 类的新实例。Initializes a new instance of the QueryAccessibilityHelpEventArgs class.

QueryAccessibilityHelpEventArgs(String, String, String) QueryAccessibilityHelpEventArgs(String, String, String) QueryAccessibilityHelpEventArgs(String, String, String) QueryAccessibilityHelpEventArgs(String, String, String)

初始化 QueryAccessibilityHelpEventArgs 类的新实例。Initializes a new instance of the QueryAccessibilityHelpEventArgs class.

属性

HelpKeyword HelpKeyword HelpKeyword HelpKeyword

获取或设置指定控件的帮助关键字。Gets or sets the Help keyword for the specified control.

HelpNamespace HelpNamespace HelpNamespace HelpNamespace

获取或设置一个值,指定帮助文件的名称。Gets or sets a value specifying the name of the Help file.

HelpString HelpString HelpString HelpString

获取或设置定义为获取何种帮助的字符串AccessibleObjectGets or sets the string defining what Help to get for the AccessibleObject.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

适用于

另请参阅