Control.AccessibilityNotifyClients Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Notifica as aplicações cliente de acessibilidade de AccessibleEvents.
Sobrecargas
| Name | Description |
|---|---|
| AccessibilityNotifyClients(AccessibleEvents, Int32) |
Notifica as aplicações do cliente de acessibilidade sobre o especificado AccessibleEvents para o controlo da criança especificado. |
| AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) |
Notifica as aplicações do cliente de acessibilidade do especificado AccessibleEvents para o controlo infantil especificado. |
AccessibilityNotifyClients(AccessibleEvents, Int32)
Notifica as aplicações do cliente de acessibilidade sobre o especificado AccessibleEvents para o controlo da criança especificado.
protected:
void AccessibilityNotifyClients(System::Windows::Forms::AccessibleEvents accEvent, int childID);
protected public:
void AccessibilityNotifyClients(System::Windows::Forms::AccessibleEvents accEvent, int childID);
protected void AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents accEvent, int childID);
protected internal void AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents accEvent, int childID);
member this.AccessibilityNotifyClients : System.Windows.Forms.AccessibleEvents * int -> unit
Protected Sub AccessibilityNotifyClients (accEvent As AccessibleEvents, childID As Integer)
Protected Friend Sub AccessibilityNotifyClients (accEvent As AccessibleEvents, childID As Integer)
Parâmetros
- accEvent
- AccessibleEvents
Para AccessibleEvents notificar as aplicações do cliente de acessibilidade de.
Exemplos
O exemplo de código seguinte demonstra a criação de um controlo de gráfico consciente da acessibilidade, usando as AccessibleObject classes e Control.ControlAccessibleObject para expor informação acessível. O controlo traça duas curvas juntamente com uma legenda. A ChartControlAccessibleObject classe, que deriva de ControlAccessibleObject, é usada no CreateAccessibilityInstance método para fornecer informação acessível personalizada para o controlo do mapa. Como a legenda do mapa não é um controlo -based real Control , mas sim desenhada pelo controlo do mapa, não fornece qualquer informação acessível incorporada. Por causa disso, a ChartControlAccessibleObject classe sobrepõe o GetChild método para devolver o CurveLegendAccessibleObject que representa informação acessível para cada parte da legenda. Quando uma aplicação acessível-consciente utiliza este controlo, este pode fornecer a informação necessária e acessível.
Este excerto do código demonstra como chamar o AccessibilityNotifyClients método. Consulte a AccessibleObject visão geral da classe para o exemplo completo do código.
// Gets or sets the location for the curve legend.
Point get()
{
return location;
}
void set( Point value )
{
location = value;
chart->Invalidate();
// Notifies the chart of the location change. This is used for
// the accessibility information. AccessibleEvents::LocationChange
// tells the chart the reason for the notification.
chart->AccessibilityNotifyClients( AccessibleEvents::LocationChange, (dynamic_cast<CurveLegendAccessibleObject^>(AccessibilityObject))->ID );
}
}
property String^ Name
{
// Gets or sets the Name for the curve legend.
String^ get()
{
return name;
}
void set( String^ value )
{
if ( name != value )
{
name = value;
chart->Invalidate();
// Notifies the chart of the name change. This is used for
// the accessibility information. AccessibleEvents::NameChange
// tells the chart the reason for the notification.
chart->AccessibilityNotifyClients( AccessibleEvents::NameChange, (dynamic_cast<CurveLegendAccessibleObject^>(AccessibilityObject))->ID );
}
}
}
property bool Selected
{
// Gets or sets the Selected state for the curve legend.
bool get()
{
return selected;
}
void set( bool value )
{
if ( selected != value )
{
selected = value;
chart->Invalidate();
// Notifies the chart of the selection value change. This is used for
// the accessibility information. The AccessibleEvents value depends upon
// if the selection is true (AccessibleEvents::SelectionAdd) or
// false (AccessibleEvents::SelectionRemove).
chart->AccessibilityNotifyClients( selected ? AccessibleEvents::SelectionAdd : AccessibleEvents::SelectionRemove, (dynamic_cast<CurveLegendAccessibleObject^>(AccessibilityObject))->ID );
}
}
// Gets or sets the location for the curve legend.
public Point Location
{
get {
return location;
}
set {
location = value;
chart.Invalidate();
// Notifies the chart of the location change. This is used for
// the accessibility information. AccessibleEvents.LocationChange
// tells the chart the reason for the notification.
chart.AccessibilityNotifyClients(AccessibleEvents.LocationChange,
((CurveLegendAccessibleObject)AccessibilityObject).ID);
}
}
// Gets or sets the Name for the curve legend.
public string Name
{
get {
return name;
}
set {
if (name != value)
{
name = value;
chart.Invalidate();
// Notifies the chart of the name change. This is used for
// the accessibility information. AccessibleEvents.NameChange
// tells the chart the reason for the notification.
chart.AccessibilityNotifyClients(AccessibleEvents.NameChange,
((CurveLegendAccessibleObject)AccessibilityObject).ID);
}
}
}
// Gets or sets the Selected state for the curve legend.
public bool Selected
{
get {
return selected;
}
set {
if (selected != value)
{
selected = value;
chart.Invalidate();
// Notifies the chart of the selection value change. This is used for
// the accessibility information. The AccessibleEvents value depends upon
// if the selection is true (AccessibleEvents.SelectionAdd) or
// false (AccessibleEvents.SelectionRemove).
chart.AccessibilityNotifyClients(
selected ? AccessibleEvents.SelectionAdd : AccessibleEvents.SelectionRemove,
((CurveLegendAccessibleObject)AccessibilityObject).ID);
}
}
}
' Gets or sets the location for the curve legend.
Public Property Location() As Point
Get
Return m_location
End Get
Set
m_location = value
chart.Invalidate()
' Notifies the chart of the location change. This is used for
' the accessibility information. AccessibleEvents.LocationChange
' tells the chart the reason for the notification.
chart.ExposeAccessibilityNotifyClients(AccessibleEvents.LocationChange, _
CType(AccessibilityObject, CurveLegendAccessibleObject).ID)
End Set
End Property
' Gets or sets the Name for the curve legend.
Public Property Name() As String
Get
Return m_name
End Get
Set
If m_name <> value Then
m_name = value
chart.Invalidate()
' Notifies the chart of the name change. This is used for
' the accessibility information. AccessibleEvents.NameChange
' tells the chart the reason for the notification.
chart.ExposeAccessibilityNotifyClients(AccessibleEvents.NameChange, _
CType(AccessibilityObject, CurveLegendAccessibleObject).ID)
End If
End Set
End Property
' Gets or sets the Selected state for the curve legend.
Public Property Selected() As Boolean
Get
Return m_selected
End Get
Set
If m_selected <> value Then
m_selected = value
chart.Invalidate()
' Notifies the chart of the selection value change. This is used for
' the accessibility information. The AccessibleEvents value varies
' on whether the selection is true (AccessibleEvents.SelectionAdd) or
' false (AccessibleEvents.SelectionRemove).
If m_selected Then
chart.ExposeAccessibilityNotifyClients(AccessibleEvents.SelectionAdd, _
CType(AccessibilityObject, CurveLegendAccessibleObject).ID)
Else
chart.ExposeAccessibilityNotifyClients(AccessibleEvents.SelectionRemove, _
CType(AccessibilityObject, CurveLegendAccessibleObject).ID)
End If
End If
End Set
End Property
Observações
Deve ligar para o Control.ControlAccessibleObject.NotifyClients método de cada AccessibleEvents uma das aplicações clientes de acessibilidade que devem ser notificadas. O NotifyClients método é normalmente chamado quando uma propriedade está definida ou a partir de um gestor de eventos. Por exemplo, pode chamar o NotifyClients método e passar um AccessibleEvents valor de Hide dentro do handler de eventos para o Control.VisibleChanged evento.
Ver também
Aplica-se a
AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)
Notifica as aplicações do cliente de acessibilidade do especificado AccessibleEvents para o controlo infantil especificado.
protected:
void AccessibilityNotifyClients(System::Windows::Forms::AccessibleEvents accEvent, int objectID, int childID);
protected void AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents accEvent, int objectID, int childID);
member this.AccessibilityNotifyClients : System.Windows.Forms.AccessibleEvents * int * int -> unit
Protected Sub AccessibilityNotifyClients (accEvent As AccessibleEvents, objectID As Integer, childID As Integer)
Parâmetros
- accEvent
- AccessibleEvents
Para AccessibleEvents notificar as aplicações do cliente de acessibilidade de.
- objectID
- Int32
O identificador do AccessibleObject.