Control.AccessibilityNotifyClients Methode

Definition

Benachrichtigt die Clientanwendungen für die Barrierefreiheit von AccessibleEvents.

Überlädt

Name Beschreibung
AccessibilityNotifyClients(AccessibleEvents, Int32)

Benachrichtigt die Clientanwendungen für die Barrierefreiheit des angegebenen AccessibleEvents untergeordneten Steuerelements.

AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

Benachrichtigt die Clientanwendungen für die Barrierefreiheit des angegebenen AccessibleEvents untergeordneten Steuerelements.

AccessibilityNotifyClients(AccessibleEvents, Int32)

Quelle:
Control.cs
Quelle:
Control.cs
Quelle:
Control.cs
Quelle:
Control.cs
Quelle:
Control.cs

Benachrichtigt die Clientanwendungen für die Barrierefreiheit des angegebenen AccessibleEvents untergeordneten Steuerelements.

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)

Parameter

accEvent
AccessibleEvents

Die AccessibleEvents Barrierefreiheitsclientanwendungen werden benachrichtigt.

childID
Int32

Das Kind Control , das über das barrierefreie Ereignis benachrichtigt werden soll.

Beispiele

Im folgenden Codebeispiel wird die Erstellung eines barrierefreiheitsbewussten Diagrammsteuerelements dargestellt, wobei mithilfe der Klassen AccessibleObject und Control.ControlAccessibleObject barrierefreie Informationen verfügbar gemacht werden. Das Steuerelement zeichnet zwei Kurven zusammen mit einer Legende. Die ChartControlAccessibleObject Klasse, die von ControlAccessibleObject abgeleitet wird, wird in der CreateAccessibilityInstance Methode verwendet, um benutzerdefinierte zugängliche Informationen für das Diagrammsteuerelement bereitzustellen. Da die Diagrammlegende kein tatsächliches Control -based-Steuerelement ist, sondern stattdessen vom Diagrammsteuerelement gezeichnet wird, werden keine integrierten barrierefreien Informationen verwendet. Aus diesem Grund überschreibt die ChartControlAccessibleObject Klasse die GetChild Methode, um die CurveLegendAccessibleObject barrierefreien Informationen für jeden Teil der Legende zurückzugeben. Wenn eine barrierefreie Anwendung dieses Steuerelement verwendet, kann das Steuerelement die erforderlichen barrierefreien Informationen bereitstellen.

Dieser Codeauszug veranschaulicht das Aufrufen der AccessibilityNotifyClients Methode. AccessibleObject Die Klassenübersicht finden Sie im vollständigen Codebeispiel.

   // 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

Hinweise

Sie müssen die Control.ControlAccessibleObject.NotifyClients Methode für jede AccessibleEvents Barrierefreiheitsclientanwendung aufrufen, über die Sie benachrichtigt werden müssen. Die NotifyClients Methode wird in der Regel aufgerufen, wenn eine Eigenschaft innerhalb eines Ereignishandlers festgelegt oder verwendet wird. Sie können z. B. die NotifyClients Methode aufrufen und einen AccessibleEvents Wert aus Hide dem Ereignishandler für das Control.VisibleChanged Ereignis übergeben.

Weitere Informationen

Gilt für:

AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

Quelle:
Control.cs
Quelle:
Control.cs
Quelle:
Control.cs
Quelle:
Control.cs
Quelle:
Control.cs

Benachrichtigt die Clientanwendungen für die Barrierefreiheit des angegebenen AccessibleEvents untergeordneten Steuerelements.

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)

Parameter

accEvent
AccessibleEvents

Die AccessibleEvents Barrierefreiheitsclientanwendungen werden benachrichtigt.

objectID
Int32

Der Bezeichner der AccessibleObject.

childID
Int32

Das Kind Control , das über das barrierefreie Ereignis benachrichtigt werden soll.

Gilt für: