Control.AccessibilityNotifyClients Control.AccessibilityNotifyClients Control.AccessibilityNotifyClients Control.AccessibilityNotifyClients Method

Definizione

Notifica alle applicazioni client di accessibilità l'oggetto AccessibleEvents.Notifies the accessibility client applications of AccessibleEvents.

Overload

AccessibilityNotifyClients(AccessibleEvents, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32)

Notifica alle applicazioni client di accessibilità l'oggetto AccessibleEvents specificato per il controllo figlio specifico.Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control.

AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

Notifica alle applicazioni client di accessibilità l'oggetto AccessibleEvents specificato per il controllo figlio specifico.Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control .

AccessibilityNotifyClients(AccessibleEvents, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32)

Notifica alle applicazioni client di accessibilità l'oggetto AccessibleEvents specificato per il controllo figlio specifico.Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control.

protected public:
 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 Friend Sub AccessibilityNotifyClients (accEvent As AccessibleEvents, childID As Integer)

Parametri

accEvent
AccessibleEvents AccessibleEvents AccessibleEvents AccessibleEvents

Oggetto AccessibleEvents da notificare alle applicazioni client di accessibilità.The AccessibleEvents to notify the accessibility client applications of.

childID
Int32 Int32 Int32 Int32

Controllo Control figlio cui notificare l'evento accessibile.The child Control to notify of the accessible event.

Esempi

Nell'esempio di codice seguente viene illustrata la creazione di un controllo Chart compatibile con l' AccessibleObject accessibilità, utilizzando le classi e Control.ControlAccessibleObject per esporre le informazioni accessibili.The following code example demonstrates the creation of an accessibility-aware chart control, using the AccessibleObject and Control.ControlAccessibleObject classes to expose accessible information. Il controllo traccia due curve insieme a una legenda.The control plots two curves along with a legend. La ChartControlAccessibleObject classe, che deriva da ControlAccessibleObject CreateAccessibilityInstance , viene utilizzata nel metodo per fornire informazioni personalizzate accessibili per il controllo Chart.The ChartControlAccessibleObject class, which derives from ControlAccessibleObject, is used in the CreateAccessibilityInstance method to provide custom accessible information for the chart control. Poiché la legenda del grafico non è Control un controllo basato su effettivi, ma viene invece disegnata dal controllo Chart, non vengono fornite informazioni incorporate accessibili.Since 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. Per questo motivo, la ChartControlAccessibleObject classe esegue l' GetChild override del metodo per CurveLegendAccessibleObject restituire l'oggetto che rappresenta le informazioni accessibili per ogni parte della legenda.Because of this, the ChartControlAccessibleObject class overrides the GetChild method to return the CurveLegendAccessibleObject that represents accessible information for each part of the legend. Quando un'applicazione in grado di riconoscere accessibilità utilizza questo controllo, il controllo può fornire le informazioni accessibili necessarie.When an accessible-aware application uses this control, the control can provide the necessary accessible information.

Questo estratto di codice illustra la AccessibilityNotifyClients chiamata al metodo.This code excerpt demonstrates calling the AccessibilityNotifyClients method. Per l'esempio di codice completo, vedere Cenni preliminari sulla classe.AccessibleObjectSee the AccessibleObject class overview for the complete code example.

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

Commenti

È necessario chiamare il Control.ControlAccessibleObject.NotifyClients metodo per ogni AccessibleEvents applicazione client di accessibilità a cui deve essere inviata una notifica.You must call the Control.ControlAccessibleObject.NotifyClients method for each AccessibleEvents the accessibility client applications are to be notified of. Il NotifyClients metodo viene in genere chiamato quando viene impostata una proprietà o all'interno di un gestore eventi.The NotifyClients method is typically called when a property is set or from within an event handler. Ad esempio, è possibile chiamare il NotifyClients metodo e passare un AccessibleEvents valore di Hide dall'interno del gestore eventi per l' Control.VisibleChanged evento.For example, you might call the NotifyClients method and pass in an AccessibleEvents value of Hide from within the event handler for the Control.VisibleChanged event.

Vedi anche

AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

Notifica alle applicazioni client di accessibilità l'oggetto AccessibleEvents specificato per il controllo figlio specifico.Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control .

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)

Parametri

accEvent
AccessibleEvents AccessibleEvents AccessibleEvents AccessibleEvents

Oggetto AccessibleEvents da notificare alle applicazioni client di accessibilità.The AccessibleEvents to notify the accessibility client applications of.

objectID
Int32 Int32 Int32 Int32

Identificatore di AccessibleObject.The identifier of the AccessibleObject.

childID
Int32 Int32 Int32 Int32

Controllo Control figlio cui notificare l'evento accessibile.The child Control to notify of the accessible event.

Si applica a