Control.AccessibilityNotifyClients Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Уведомляет клиентские приложения AccessibleEventsспециальных возможностей.
Перегрузки
| Имя | Описание |
|---|---|
| AccessibilityNotifyClients(AccessibleEvents, Int32) |
Уведомляет клиентские приложения специальных возможностей для указанного дочернего AccessibleEvents элемента управления. |
| AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) |
Уведомляет клиентские приложения специальных возможностей, указанные для указанного дочернего AccessibleEvents элемента управления. |
AccessibilityNotifyClients(AccessibleEvents, Int32)
- Исходный код:
- Control.cs
- Исходный код:
- Control.cs
- Исходный код:
- Control.cs
- Исходный код:
- Control.cs
- Исходный код:
- Control.cs
Уведомляет клиентские приложения специальных возможностей для указанного дочернего AccessibleEvents элемента управления.
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)
Параметры
- accEvent
- AccessibleEvents
Уведомление AccessibleEvents о клиентских приложениях специальных возможностей.
Примеры
В следующем примере кода показано создание элемента управления диаграммы с поддержкой специальных возможностей с помощью AccessibleObject и Control.ControlAccessibleObject классов для предоставления доступной информации. Элемент управления отображает две кривые вместе с условным обозначениям. Класс ChartControlAccessibleObject , производный от ControlAccessibleObjectэтого, используется в методе CreateAccessibilityInstance для предоставления пользовательских доступных сведений для элемента управления диаграммой. Так как условные обозначения диаграммы не являются фактическим Control элементом управления -based, но вместо этого рисуется элементом управления диаграммы, он не имеет встроенных доступных сведений. Из-за этого ChartControlAccessibleObject класс переопределяет GetChild метод, возвращающий CurveLegendAccessibleObject доступную информацию для каждой части условных обозначений. Если приложение с поддержкой доступности использует этот элемент управления, элемент управления может предоставить необходимую информацию.
Этот фрагмент кода демонстрирует вызов AccessibilityNotifyClients метода. Ознакомьтесь с общими сведениями о AccessibleObject классе для полного примера кода.
// 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
Комментарии
Необходимо вызвать Control.ControlAccessibleObject.NotifyClients метод для каждого AccessibleEvents клиентского приложения специальных возможностей. Метод NotifyClients обычно вызывается, когда свойство задано или из обработчика событий. Например, можно вызвать NotifyClients метод и передать AccessibleEvents значение Hide из обработчика событий для Control.VisibleChanged события.
См. также раздел
Применяется к
AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)
- Исходный код:
- Control.cs
- Исходный код:
- Control.cs
- Исходный код:
- Control.cs
- Исходный код:
- Control.cs
- Исходный код:
- Control.cs
Уведомляет клиентские приложения специальных возможностей, указанные для указанного дочернего AccessibleEvents элемента управления.
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)
Параметры
- accEvent
- AccessibleEvents
Уведомление AccessibleEvents о клиентских приложениях специальных возможностей.
- objectID
- Int32
AccessibleObjectИдентификатор объекта .