AccessibleObject AccessibleObject AccessibleObject AccessibleObject Class

정의

접근성 애플리케이션이 장애가 있는 사용자를 위해 애플리케이션 UI(사용자 인터페이스)를 조정하는 데 사용하는 정보를 제공합니다.Provides information that accessibility applications use to adjust an application's user interface (UI) for users with impairments.

public ref class AccessibleObject : System::Runtime::InteropServices::StandardOleMarshalObject, Accessibility::IAccessible, System::Reflection::IReflect
[System.Runtime.InteropServices.ComVisible(true)]
public class AccessibleObject : System.Runtime.InteropServices.StandardOleMarshalObject, Accessibility.IAccessible, System.Reflection.IReflect
type AccessibleObject = class
    inherit StandardOleMarshalObject
    interface IReflect
    interface IAccessible
Public Class AccessibleObject
Inherits StandardOleMarshalObject
Implements IAccessible, IReflect
상속
AccessibleObjectAccessibleObjectAccessibleObjectAccessibleObject
파생
특성
구현

예제

다음 코드 예제에서는 내게 필요한 옵션 인식 차트를 만드는 방법을 보여 줍니다 컨트롤을 사용 하 여 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 have 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.

#using <Accessibility.dll>
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>

using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;

// Declare a chart control that demonstrates accessibility in Windows Forms.
public ref class ChartControl: public System::Windows::Forms::UserControl
{
public:
   ref class ChartControlAccessibleObject;

   // forward declaration
   // Inner Class that represents a legend for a curve in the chart.
   ref class CurveLegend
   {

      // Inner class CurveLegendAccessibleObject represents accessible information
      // associated with the CurveLegend object.
   public:
      ref class CurveLegendAccessibleObject: public AccessibleObject
      {
      private:
         CurveLegend^ curveLegend;

      public:
         CurveLegendAccessibleObject( CurveLegend^ curveLegend )
            : AccessibleObject()
         {
            this->curveLegend = curveLegend;
         }


      private:

         property ChartControlAccessibleObject^ ChartControl 
         {

            // Private property that helps get the reference to the parent ChartControl.
            ChartControlAccessibleObject^ get()
            {
               return dynamic_cast<ChartControlAccessibleObject^>(Parent);
            }

         }

      internal:

         property int ID 
         {

            // Internal helper function that returns the ID for this CurveLegend.
            int get()
            {
               for ( int i = 0; i < ChartControl->GetChildCount(); i++ )
               {
                  if ( ChartControl->GetChild( i ) == this )
                  {
                     return i;
                  }

               }
               return  -1;
            }

         }

      public:

         property Rectangle Bounds 
         {

            // Gets the Bounds for the CurveLegend. This is used by accessibility programs.
            virtual Rectangle get() override
            {
               
               // The bounds is in screen coordinates.
               Point loc = curveLegend->Location;
               return Rectangle(curveLegend->chart->PointToScreen( loc ),curveLegend->Size);
            }

         }

         property String^ Name 
         {

            // Gets or sets the Name for the CurveLegend. This is used by accessibility programs.
            virtual String^ get() override
            {
               return curveLegend->Name;
            }

            virtual void set( String^ value ) override
            {
               curveLegend->Name = value;
            }

         }

         property AccessibleObject^ Parent 
         {

            // Gets the Curve Legend Parent's Accessible object.
            // This is used by accessibility programs.
            virtual AccessibleObject^ get() override
            {
               return curveLegend->chart->AccessibilityObject;
            }

         }

         property System::Windows::Forms::AccessibleRole Role 
         {

            // Gets the role for the CurveLegend. This is used by accessibility programs.
            virtual System::Windows::Forms::AccessibleRole get() override
            {
               return ::AccessibleRole::StaticText;
            }

         }

         property AccessibleStates State 
         {

            // Gets the state based on the selection for the CurveLegend.
            // This is used by accessibility programs.
            virtual AccessibleStates get() override
            {
               AccessibleStates state = AccessibleStates::Selectable;
               if ( curveLegend->Selected )
               {
                  state = static_cast<AccessibleStates>(state | AccessibleStates::Selected);
               }

               return state;
            }

         }

         // Navigates through siblings of this CurveLegend. This is used by accessibility programs.
         virtual AccessibleObject^ Navigate( AccessibleNavigation navdir ) override
         {
            
            // Uses the internal NavigateFromChild helper function that exists
            // on ChartControlAccessibleObject.
            return ChartControl->NavigateFromChild( this, navdir );
         }


         // Selects or unselects this CurveLegend. This is used by accessibility programs.
         virtual void Select( AccessibleSelection selection ) override
         {
            
            // Uses the internal SelectChild helper function that exists
            // on ChartControlAccessibleObject.
            ChartControl->SelectChild( this, selection );
         }

      };


   private:

      // class CurveLgendAccessibleObject
      String^ name;
      ChartControl^ chart;
      CurveLegendAccessibleObject^ accObj;
      bool selected;
      Point location;

   public:
      CurveLegend( ChartControl^ chart, String^ name )
      {
         this->chart = chart;
         this->name = name;
         selected = true;
      }


      property AccessibleObject^ AccessibilityObject 
      {

         // Gets the accessibility object for the curve legend.
         AccessibleObject^ get()
         {
            if ( accObj == nullptr )
            {
               accObj = gcnew CurveLegendAccessibleObject( this );
            }

            return accObj;
         }

      }

      property Rectangle Bounds 
      {

         // Gets the bounds for the curve legend.
         Rectangle get()
         {
            return Rectangle(Location,Size);
         }

      }

      property Point Location 
      {

         // 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 );
            }
         }

      }

      property System::Drawing::Size Size 
      {

         // Gets the Size for the curve legend.
         System::Drawing::Size get()
         {
            int legendHeight = chart->Font->Height + 4;
            Graphics^ g = chart->CreateGraphics();
            int legendWidth = (int)g->MeasureString( Name, chart->Font ).Width + 4;
            return System::Drawing::Size( legendWidth, legendHeight );
         }

      }

   };


private:

   // class CurveLegend
   CurveLegend^ legend1;
   CurveLegend^ legend2;

public:
   ChartControl()
   {
      
      // The ChartControl draws the chart in the OnPaint .
      SetStyle( ControlStyles::ResizeRedraw, true );
      SetStyle( ControlStyles::DoubleBuffer, true );
      SetStyle( ControlStyles::AllPaintingInWmPaint, true );
      this->BackColor = System::Drawing::Color::White;
      this->Name = "ChartControl";
      this->Click += gcnew System::EventHandler( this, &ChartControl::ChartControl_Click );
      this->QueryAccessibilityHelp += gcnew System::Windows::Forms::QueryAccessibilityHelpEventHandler( this, &ChartControl::ChartControl_QueryAccessibilityHelp );
      
      // The CurveLengend is not Control-based, it just
      // represents the parts of the legend.
      legend1 = gcnew CurveLegend( this,"A" );
      legend1->Location = Point(20,30);
      legend2 = gcnew CurveLegend( this,"B" );
      legend2->Location = Point(20,50);
   }



protected:
   // Overridden to return the custom AccessibleObject
   // for the entire chart.
   virtual AccessibleObject^ CreateAccessibilityInstance() override
   {
      return gcnew ChartControlAccessibleObject( this );
   }

   virtual void OnPaint( PaintEventArgs^ e ) override
   {
      
      // The ChartControl draws the chart in the OnPaint .
      System::Windows::Forms::UserControl::OnPaint( e );
      Rectangle bounds = this->ClientRectangle;
      int border = 5;
      
      // Draws the legends first.
      StringFormat^ format = gcnew StringFormat;
      format->Alignment = StringAlignment::Center;
      format->LineAlignment = StringAlignment::Center;
      if ( legend1 != nullptr )
      {
         if ( legend1->Selected )
         {
            e->Graphics->FillRectangle( gcnew SolidBrush( Color::Blue ), legend1->Bounds );
         }
         else
         {
            e->Graphics->DrawRectangle( Pens::Blue, legend1->Bounds );
         }

         e->Graphics->DrawString( legend1->Name, this->Font, Brushes::Black, legend1->Bounds, format );
      }

      if ( legend2 != nullptr )
      {
         if ( legend2->Selected )
         {
            e->Graphics->FillRectangle( gcnew SolidBrush( Color::Red ), legend2->Bounds );
         }
         else
         {
            e->Graphics->DrawRectangle( Pens::Red, legend2->Bounds );
         }

         e->Graphics->DrawString( legend2->Name, this->Font, Brushes::Black, legend2->Bounds, format );
      }

      
      // Charts out the actual curves that represent data in the Chart.
      bounds.Inflate(  -border,  -border );
      array<Point>^ temp1 = {Point(bounds.Left,bounds.Bottom),Point(bounds.Left + bounds.Width / 3,bounds.Top + bounds.Height / 5),Point(bounds.Right - bounds.Width / 3,(bounds.Top + bounds.Bottom) / 2),Point(bounds.Right,bounds.Top)};
      array<Point>^curve1 = temp1;
      array<Point>^ temp2 = {Point(bounds.Left,bounds.Bottom - bounds.Height / 3),Point(bounds.Left + bounds.Width / 3,bounds.Top + bounds.Height / 5),Point(bounds.Right - bounds.Width / 3,(bounds.Top + bounds.Bottom) / 2),Point(bounds.Right,bounds.Top + bounds.Height / 2)};
      array<Point>^curve2 = temp2;
      
      // Draws the actual curve only if it is selected.
      if ( legend1->Selected )
            e->Graphics->DrawCurve( Pens::Blue, curve1 );

      if ( legend2->Selected )
            e->Graphics->DrawCurve( Pens::Red, curve2 );

      e->Graphics->DrawRectangle( Pens::Blue, bounds );
   }

   // Handles the QueryAccessibilityHelp event.
   void ChartControl_QueryAccessibilityHelp( Object^ /*sender*/, System::Windows::Forms::QueryAccessibilityHelpEventArgs^ e )
   {
      e->HelpString = "Displays chart data";
   }

   // Handles the Click event for the chart.
   // Toggles the selection of whatever legend was clicked on
   void ChartControl_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      Point pt = this->PointToClient( Control::MousePosition );
      if ( legend1->Bounds.Contains( pt ) )
      {
         legend1->Selected =  !legend1->Selected;
      }
      else
      if ( legend2->Bounds.Contains( pt ) )
      {
         legend2->Selected =  !legend2->Selected;
      }
   }


public:

   property array<CurveLegend^>^ Legends 
   {

      // Gets an array of CurveLengends used in the Chart.
      array<CurveLegend^>^ get()
      {
         array<CurveLegend^>^temp3 = {legend1,legend2};
         return temp3;
      }

   }

   // Inner class ChartControlAccessibleObject represents accessible information associated with the ChartControl.
   // The ChartControlAccessibleObject is returned in the ChartControl::CreateAccessibilityInstance .
   ref class ChartControlAccessibleObject: public ControlAccessibleObject
   {
   private:
      ChartControl^ chartControl;

   public:
      ChartControlAccessibleObject( ChartControl^ ctrl )
         : ControlAccessibleObject( ctrl )
      {
         chartControl = ctrl;
      }


      property System::Windows::Forms::AccessibleRole Role 
      {

         // Gets the role for the Chart. This is used by accessibility programs.
         virtual System::Windows::Forms::AccessibleRole get() override
         {
            return ::AccessibleRole::Chart;
         }

      }

      property AccessibleStates State 
      {

         // Gets the state for the Chart. This is used by accessibility programs.
         virtual AccessibleStates get() override
         {
            return AccessibleStates::ReadOnly;
         }

      }

      // The CurveLegend objects are "child" controls in terms of accessibility so
      // return the number of ChartLengend objects.
      virtual int GetChildCount() override
      {
         return chartControl->Legends->Length;
      }


      // Gets the Accessibility object of the child CurveLegend idetified by index.
      virtual AccessibleObject^ GetChild( int index ) override
      {
         if ( index >= 0 && index < chartControl->Legends->Length )
         {
            return chartControl->Legends[ index ]->AccessibilityObject;
         }

         return nullptr;
      }


   internal:

      // Helper function that is used by the CurveLegend's accessibility object
      // to navigate between sibiling controls. Specifically, this function is used in
      // the CurveLegend::CurveLegendAccessibleObject.Navigate function.
      AccessibleObject^ NavigateFromChild( CurveLegend::CurveLegendAccessibleObject^ child, AccessibleNavigation navdir )
      {
         switch ( navdir )
         {
            case AccessibleNavigation::Down:
            case AccessibleNavigation::Next:
               return GetChild( child->ID + 1 );

            case AccessibleNavigation::Up:
            case AccessibleNavigation::Previous:
               return GetChild( child->ID - 1 );
         }
         return nullptr;
      }


      // Helper function that is used by the CurveLegend's accessibility object
      // to select a specific CurveLegend control. Specifically, this function is used
      // in the CurveLegend::CurveLegendAccessibleObject.Select function.
      void SelectChild( CurveLegend::CurveLegendAccessibleObject^ child, AccessibleSelection selection )
      {
         int childID = child->ID;
         
         // Determine which selection action should occur, based on the
         // AccessibleSelection value.
         if ( (selection & AccessibleSelection::TakeSelection) != (AccessibleSelection)0 )
         {
            for ( int i = 0; i < chartControl->Legends->Length; i++ )
            {
               if ( i == childID )
               {
                  chartControl->Legends[ i ]->Selected = true;
               }
               else
               {
                  chartControl->Legends[ i ]->Selected = false;
               }

            }
            
            // AccessibleSelection->AddSelection means that the CurveLegend will be selected.
            if ( (selection & AccessibleSelection::AddSelection) != (AccessibleSelection)0 )
            {
               chartControl->Legends[ childID ]->Selected = true;
            }
            
            // AccessibleSelection->AddSelection means that the CurveLegend will be unselected.
            if ( (selection & AccessibleSelection::RemoveSelection) != (AccessibleSelection)0 )
            {
               chartControl->Legends[ childID ]->Selected = false;
            }
         }
      }

   };

   // class ChartControlAccessibleObject
};


// class ChartControl
public ref class Form1: public System::Windows::Forms::Form
{
private:

   // Test out the Chart Control.
   ChartControl^ chart1;

public:
   Form1()
   {
      
      // Create a chart control and add it to the form.
      this->chart1 = gcnew ChartControl;
      this->ClientSize = System::Drawing::Size( 920, 566 );
      this->chart1->Location = System::Drawing::Point( 47, 16 );
      this->chart1->Size = System::Drawing::Size( 600, 400 );
      this->Controls->Add( this->chart1 );
   }

};


// class Form1

[STAThread]
int main()
{
   Application::Run( gcnew Form1 );
}

using System;
using System.Drawing;
using System.Windows.Forms;

namespace ChartControl
{
    public class Form1 : System.Windows.Forms.Form
    {
        // Test out the Chart Control.
        private ChartControl chart1;

        [STAThread]
        static void Main() 
        {
            Application.Run(new Form1());
        }

        public Form1() {
            // Create a chart control and add it to the form.
            this.chart1 = new ChartControl();
            this.ClientSize = new System.Drawing.Size(920, 566);

            this.chart1.Location = new System.Drawing.Point(47, 16);
            this.chart1.Size = new System.Drawing.Size(600, 400);

            this.Controls.Add(this.chart1);
        }
    }

    // Declare a chart control that demonstrates accessibility in Windows Forms.
    public class ChartControl : System.Windows.Forms.UserControl
    {
        private CurveLegend legend1;
        private CurveLegend legend2; 

        public ChartControl()
        {
            // The ChartControl draws the chart in the OnPaint override.
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            this.BackColor = System.Drawing.Color.White;
            this.Name = "ChartControl";

            this.Click += new System.EventHandler(this.ChartControl_Click);
            this.QueryAccessibilityHelp += 
                new System.Windows.Forms.QueryAccessibilityHelpEventHandler(
                                        this.ChartControl_QueryAccessibilityHelp);

            // The CurveLengend is not Control-based, it just
            // represents the parts of the legend.
            legend1 = new CurveLegend(this, "A");
            legend1.Location = new Point(20, 30);
            legend2 = new CurveLegend(this, "B");        
            legend2.Location = new Point(20, 50);
        }

        // Overridden to return the custom AccessibleObject 
        // for the entire chart.
        protected override AccessibleObject CreateAccessibilityInstance() 
        {            
            return new ChartControlAccessibleObject(this);
        }

        protected override void OnPaint(PaintEventArgs e) 
        {
            // The ChartControl draws the chart in the OnPaint override.
            base.OnPaint(e);

            Rectangle bounds = this.ClientRectangle;
            int border = 5;

            // Draws the legends first.
            StringFormat format = new StringFormat();
            format.Alignment = StringAlignment.Center;
            format.LineAlignment = StringAlignment.Center;
            
            if (legend1 != null) {
                if (legend1.Selected) {
                    e.Graphics.FillRectangle(new SolidBrush(Color.Blue), legend1.Bounds);
                } else {
                    e.Graphics.DrawRectangle(Pens.Blue, legend1.Bounds);
                }

                e.Graphics.DrawString(legend1.Name, this.Font, Brushes.Black, legend1.Bounds, format);                
            }
            if (legend2 != null) {
                if (legend2.Selected) {
                    e.Graphics.FillRectangle(new SolidBrush(Color.Red), legend2.Bounds);
                } else {
                    e.Graphics.DrawRectangle(Pens.Red, legend2.Bounds);
                }
                e.Graphics.DrawString(legend2.Name, this.Font, Brushes.Black, legend2.Bounds, format);
            }            

            // Charts out the actual curves that represent data in the Chart.
            bounds.Inflate(-border, -border);
            Point[] curve1 = new Point[] {new Point(bounds.Left, bounds.Bottom),
                            new Point(bounds.Left + bounds.Width / 3, bounds.Top + bounds.Height / 5),
                            new Point(bounds.Right - bounds.Width / 3, (bounds.Top + bounds.Bottom) / 2),
                            new Point(bounds.Right, bounds.Top)};

            Point[] curve2 = new Point[] {new Point(bounds.Left, bounds.Bottom - bounds.Height / 3),
                            new Point(bounds.Left + bounds.Width / 3, bounds.Top + bounds.Height / 5),
                            new Point(bounds.Right - bounds.Width / 3, (bounds.Top + bounds.Bottom) / 2),
                            new Point(bounds.Right, bounds.Top + bounds.Height / 2)};

            // Draws the actual curve only if it is selected.
            if (legend1.Selected) e.Graphics.DrawCurve(Pens.Blue, curve1);
            if (legend2.Selected) e.Graphics.DrawCurve(Pens.Red, curve2);

            e.Graphics.DrawRectangle(Pens.Blue, bounds);            
        }

        // Handles the QueryAccessibilityHelp event.
        private void ChartControl_QueryAccessibilityHelp(object sender, 
                                    System.Windows.Forms.QueryAccessibilityHelpEventArgs e)
        {            
            e.HelpString = "Displays chart data";
        }          

        // Handles the Click event for the chart. 
        // Toggles the selection of whatever legend was clicked on
        private void ChartControl_Click(object sender, System.EventArgs e)
        {
            Point pt = this.PointToClient(Control.MousePosition);
            if (legend1.Bounds.Contains(pt)) {
                legend1.Selected = !legend1.Selected;

            } else if (legend2.Bounds.Contains(pt)) {
                legend2.Selected = !legend2.Selected;
            }
        }

        // Gets an array of CurveLengends used in the Chart.
        public CurveLegend[] Legends
        {   
            get {                
                return new CurveLegend[] { legend1, legend2 };
            }            
        }                

        // Inner class ChartControlAccessibleObject represents accessible information associated with the ChartControl.
        // The ChartControlAccessibleObject is returned in the ChartControl.CreateAccessibilityInstance override.
        public class ChartControlAccessibleObject : ControlAccessibleObject
        {
            ChartControl chartControl;

            public ChartControlAccessibleObject(ChartControl ctrl) : base(ctrl) 
            {
                chartControl = ctrl;
            }

            // Gets the role for the Chart. This is used by accessibility programs.
            public override AccessibleRole Role
            {  
                get {
                    return AccessibleRole.Chart;
                }
            }

            // Gets the state for the Chart. This is used by accessibility programs.
            public override AccessibleStates State
            {  
                get {                    
                    return AccessibleStates.ReadOnly;
                }
            }

            // The CurveLegend objects are "child" controls in terms of accessibility so 
            // return the number of ChartLengend objects.
            public override int GetChildCount()
            {  
                return chartControl.Legends.Length;
            }

            // Gets the Accessibility object of the child CurveLegend idetified by index.
            public override AccessibleObject GetChild(int index)
            {  
                if (index >= 0 && index < chartControl.Legends.Length) {
                    return chartControl.Legends[index].AccessibilityObject;
                }                
                return null;
            }

            // Helper function that is used by the CurveLegend's accessibility object
            // to navigate between sibiling controls. Specifically, this function is used in
            // the CurveLegend.CurveLegendAccessibleObject.Navigate function.
            internal AccessibleObject NavigateFromChild(CurveLegend.CurveLegendAccessibleObject child, 
                                                        AccessibleNavigation navdir) 
            {  
                switch(navdir) {
                    case AccessibleNavigation.Down:
                    case AccessibleNavigation.Next:
                        return GetChild(child.ID + 1);
                        
                    case AccessibleNavigation.Up:
                    case AccessibleNavigation.Previous:
                        return GetChild(child.ID - 1);                        
                }
                return null;
            }

            // Helper function that is used by the CurveLegend's accessibility object
            // to select a specific CurveLegend control. Specifically, this function is used
            // in the CurveLegend.CurveLegendAccessibleObject.Select function.
            internal void SelectChild(CurveLegend.CurveLegendAccessibleObject child, AccessibleSelection selection) 
            {   
                int childID = child.ID;

                // Determine which selection action should occur, based on the
                // AccessibleSelection value.
                if ((selection & AccessibleSelection.TakeSelection) != 0) {
                    for(int i = 0; i < chartControl.Legends.Length; i++) {
                        if (i == childID) {
                            chartControl.Legends[i].Selected = true;                        
                        } else {
                            chartControl.Legends[i].Selected = false;
                        }
                    }

                    // AccessibleSelection.AddSelection means that the CurveLegend will be selected.
                    if ((selection & AccessibleSelection.AddSelection) != 0) {
                        chartControl.Legends[childID].Selected = true;                        
                    }

                    // AccessibleSelection.AddSelection means that the CurveLegend will be unselected.
                    if ((selection & AccessibleSelection.RemoveSelection) != 0) {
                        chartControl.Legends[childID].Selected = false;                        
                    }
                }            
            }
        }

        // Inner Class that represents a legend for a curve in the chart.
        public class CurveLegend 
        {
            private string name;
            private ChartControl chart;
            private CurveLegendAccessibleObject accObj;
            private bool selected = true;
            private Point location;

            public CurveLegend(ChartControl chart, string name) 
            {
                this.chart = chart;
                this.name = name;
            }

            // Gets the accessibility object for the curve legend.
            public AccessibleObject AccessibilityObject
            {
                get {
                    if (accObj == null) {
                        accObj = new CurveLegendAccessibleObject(this);
                    }
                    return accObj;
                }
            }
            
            // Gets the bounds for the curve legend.
            public Rectangle Bounds
            {   
                get {
                    return new Rectangle(Location, Size);
                }
            }

            // 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 the Size for the curve legend.
            public Size Size
            {   
                get {                    
                    int legendHeight = chart.Font.Height + 4;
                    Graphics g = chart.CreateGraphics();
                    int legendWidth = (int)g.MeasureString(Name, chart.Font).Width + 4;            

                    return new Size(legendWidth, legendHeight);
                }
            }
    
            // Inner class CurveLegendAccessibleObject represents accessible information 
            // associated with the CurveLegend object.
            public class CurveLegendAccessibleObject : AccessibleObject
            {
                private CurveLegend curveLegend;

                public CurveLegendAccessibleObject(CurveLegend curveLegend) : base() 
                {
                    this.curveLegend = curveLegend;                    
                }                

                // Private property that helps get the reference to the parent ChartControl.
                private ChartControlAccessibleObject ChartControl
                {   
                    get {
                        return Parent as ChartControlAccessibleObject;
                    }
                }

                // Internal helper function that returns the ID for this CurveLegend.
                internal int ID
                {
                    get {
                        for(int i = 0; i < ChartControl.GetChildCount(); i++) {
                            if (ChartControl.GetChild(i) == this) {
                                return i;
                            }
                        }
                        return -1;
                    }
                }

                // Gets the Bounds for the CurveLegend. This is used by accessibility programs.
                public override Rectangle Bounds
                {
                    get {                        
                        // The bounds is in screen coordinates.
                        Point loc = curveLegend.Location;
                        return new Rectangle(curveLegend.chart.PointToScreen(loc), curveLegend.Size);
                    }
                }

                // Gets or sets the Name for the CurveLegend. This is used by accessibility programs.
                public override string Name
                {
                    get {
                        return curveLegend.Name;
                    }
                    set {
                        curveLegend.Name = value;                        
                    }
                }

                // Gets the Curve Legend Parent's Accessible object.
                // This is used by accessibility programs.
                public override AccessibleObject Parent
                {
                    get {
                        return curveLegend.chart.AccessibilityObject;
                    }
                }

                // Gets the role for the CurveLegend. This is used by accessibility programs.
                public override AccessibleRole Role 
                {
                    get {
                        return AccessibleRole.StaticText;
                    }
                }

                // Gets the state based on the selection for the CurveLegend. 
                // This is used by accessibility programs.
                public override AccessibleStates State 
                {
                    get {
                        AccessibleStates state = AccessibleStates.Selectable;
                        if (curveLegend.Selected) 
                        {
                            state |= AccessibleStates.Selected;
                        }
                        return state;
                    }
                }

                // Navigates through siblings of this CurveLegend. This is used by accessibility programs.
                public override AccessibleObject Navigate(AccessibleNavigation navdir) 
                {
                    // Uses the internal NavigateFromChild helper function that exists
                    // on ChartControlAccessibleObject.
                    return ChartControl.NavigateFromChild(this, navdir);
                }

                // Selects or unselects this CurveLegend. This is used by accessibility programs.
                public override void Select(AccessibleSelection selection) 
                {
                    // Uses the internal SelectChild helper function that exists
                    // on ChartControlAccessibleObject.
                    ChartControl.SelectChild(this, selection);
                }
            }
        }
    }
}
Option Explicit

Imports System
Imports System.Drawing
Imports System.Windows.Forms

Namespace ChartControlNameSpace
    
    Public Class Form1 
        Inherits System.Windows.Forms.Form

        ' Test out the Chart Control.
        Private chart1 As ChartControl

        <System.STAThread()> _
        Public Shared Sub Main()
            System.Windows.Forms.Application.Run(New Form1())
        End Sub 'Main

        Public Sub New() 
            ' Create a chart control and add it to the form.
            Me.chart1 = New ChartControl()
            Me.ClientSize = New System.Drawing.Size(920, 566)

            Me.chart1.Location = New System.Drawing.Point(47, 16)
            Me.chart1.Size = New System.Drawing.Size(600, 400)

            Me.Controls.Add(Me.chart1)
        End Sub
    End Class

    ' Declares a chart control that demonstrates Accessibility in Windows Forms.
    Public Class ChartControl
        Inherits System.Windows.Forms.UserControl

        Private legend1 As CurveLegend
        Private legend2 As CurveLegend
        
        Public Sub New()
            ' The ChartControl draws the chart in the OnPaint override.
            SetStyle(ControlStyles.ResizeRedraw, True)
            SetStyle(ControlStyles.DoubleBuffer, True)
            SetStyle(ControlStyles.AllPaintingInWmPaint, True)
            
            Me.BackColor = System.Drawing.Color.White
            Me.Name = "ChartControl"

            ' The CurveLengend is not Control-based, it just
            ' represent the parts of the legend.
            legend1 = New CurveLegend(Me, "A")
            legend1.Location = New Point(20, 30)
            legend2 = New CurveLegend(Me, "B")
            legend2.Location = New Point(20, 50)
        End Sub 'New
              
        ' Overridden to return the custom AccessibleObject 
        ' for the entire chart.
        Protected Overrides Function CreateAccessibilityInstance() As AccessibleObject
            Return New ChartControlAccessibleObject(Me)
        End Function 

        Protected Overrides Sub OnPaint(e As PaintEventArgs)
            ' The ChartControl draws the chart in the OnPaint override.
            MyBase.OnPaint(e)
            
            Dim bounds As Rectangle = Me.ClientRectangle
            Dim border As Integer = 5
            
            ' Draw the legends first.
            Dim format As New StringFormat()
            format.Alignment = StringAlignment.Center
            format.LineAlignment = StringAlignment.Center
            
            If (legend1 IsNot Nothing) Then
                If legend1.Selected Then
                    e.Graphics.FillRectangle(New SolidBrush(Color.Blue), legend1.Bounds)
                Else
                    e.Graphics.DrawRectangle(Pens.Blue, legend1.Bounds)
                End If
                e.Graphics.DrawString(legend1.Name, Me.Font, Brushes.Black, RectangleF.op_Implicit(legend1.Bounds), format)
            End If
            If (legend2 IsNot Nothing) Then
                If legend2.Selected Then
                    e.Graphics.FillRectangle(New SolidBrush(Color.Red), legend2.Bounds)
                Else
                    e.Graphics.DrawRectangle(Pens.Red, legend2.Bounds)
                End If
                e.Graphics.DrawString(legend2.Name, Me.Font, Brushes.Black, RectangleF.op_Implicit(legend2.Bounds), format)
            End If
            
            ' Chart out the actual curves that represent data in the Chart.
            bounds.Inflate(-border, -border)
            Dim curve1() As Point = {New Point(bounds.Left, bounds.Bottom), _
                                     New Point(bounds.Left + bounds.Width / 3, bounds.Top + bounds.Height / 5), _
                                     New Point(bounds.Right - bounds.Width / 3,(bounds.Top + bounds.Bottom) / 2), _
                                     New Point(bounds.Right, bounds.Top)}

            Dim curve2() As Point = {New Point(bounds.Left, bounds.Bottom - bounds.Height / 3), _
                                     New Point(bounds.Left + bounds.Width / 3, bounds.Top + bounds.Height / 5), _
                                     New Point(bounds.Right - bounds.Width / 3,(bounds.Top + bounds.Bottom) / 2), _
                                     New Point(bounds.Right, bounds.Top + bounds.Height / 2)}
            
            ' Draw the actual curve only if it is selected.
            If legend1.Selected Then
                e.Graphics.DrawCurve(Pens.Blue, curve1)
            End If
            If legend2.Selected Then
                e.Graphics.DrawCurve(Pens.Red, curve2)
            End If 
            e.Graphics.DrawRectangle(Pens.Blue, bounds)
        End Sub 'OnPaint
        
        ' 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 

        ' Handle the Click event for the chart. 
        ' Toggle the selection of whatever legend was clicked.     
        Private Sub ChartControl_Click(sender As Object, e As System.EventArgs) Handles MyBase.Click

            Dim pt As Point = Me.PointToClient(Control.MousePosition)
            If legend1.Bounds.Contains(pt) Then
                legend1.Selected = Not legend1.Selected
            Else
                If legend2.Bounds.Contains(pt) Then
                    legend2.Selected = Not legend2.Selected
                End If
            End If
        End Sub 'ChartControl_Click

        ' Get an array of the CurveLengends used in the Chart.
        Public ReadOnly Property Legends() As CurveLegend()
            Get
                Return New CurveLegend() {legend1, legend2}
            End Get
        End Property
        
        Protected Sub ExposeAccessibilityNotifyClients(ByVal accEvent As AccessibleEvents, ByVal childID As Integer)
            AccessibilityNotifyClients(accEvent, childID) 
        End Sub

        ' Inner Class ChartControlAccessibleObject represents accessible information 
        ' associated with the ChartControl.
        ' The ChartControlAccessibleObject is returned in the         ' ChartControl.CreateAccessibilityInstance override.
        Public Class ChartControlAccessibleObject
            Inherits Control.ControlAccessibleObject

            Private chartControl As ChartControl
            
            Public Sub New(ctrl As ChartControl)
                MyBase.New(ctrl)
                chartControl = ctrl
            End Sub 'New
            
            ' Get the role for the Chart. This is used by accessibility programs.            
            Public Overrides ReadOnly Property Role() As AccessibleRole
                Get
                    Return System.Windows.Forms.AccessibleRole.Chart
                End Get
            End Property
            
            ' Get the state for the Chart. This is used by accessibility programs.            
            Public Overrides ReadOnly Property State() As AccessibleStates
                Get
                    Return AccessibleStates.ReadOnly
                End Get
            End Property                        
            
            ' The CurveLegend objects are "child" controls in terms of accessibility so 
            ' return the number of ChartLengend objects.            
            Public Overrides Function GetChildCount() As Integer
                Return chartControl.Legends.Length
            End Function 
            
            ' Get the Accessibility object of the child CurveLegend idetified by index.
            Public Overrides Function GetChild(index As Integer) As AccessibleObject
                If index >= 0 And index < chartControl.Legends.Length Then
                    Return chartControl.Legends(index).AccessibilityObject
                End If
                Return Nothing
            End Function 
            
            ' Helper function that is used by the CurveLegend's accessibility object
            ' to navigate between sibiling controls. Specifically, this function is used in
            ' the CurveLegend.CurveLegendAccessibleObject.Navigate function.
            Friend Function NavigateFromChild(child As CurveLegend.CurveLegendAccessibleObject, _
                                            navdir As AccessibleNavigation) As AccessibleObject
                Select Case navdir
                    Case AccessibleNavigation.Down, AccessibleNavigation.Next
                            Return GetChild(child.ID + 1)
                    
                    Case AccessibleNavigation.Up, AccessibleNavigation.Previous
                            Return GetChild(child.ID - 1)
                End Select
                Return Nothing
            End Function            

            ' Helper function that is used by the CurveLegend's accessibility object
            ' to select a specific CurveLegend control. Specifically, this function is used 
            ' in the CurveLegend.CurveLegendAccessibleObject.Select function.            
            Friend Sub SelectChild(child As CurveLegend.CurveLegendAccessibleObject, selection As AccessibleSelection)
                Dim childID As Integer = child.ID
                
                ' Determine which selection action should occur, based on the
                ' AccessibleSelection value.
                If (selection And AccessibleSelection.TakeSelection) <> 0 Then
                    Dim i As Integer
                    For i = 0 To chartControl.Legends.Length - 1
                        If i = childID Then
                            chartControl.Legends(i).Selected = True
                        Else
                            chartControl.Legends(i).Selected = False
                        End If
                    Next i
                    
                    ' AccessibleSelection.AddSelection means that the CurveLegend will be selected.
                    If (selection And AccessibleSelection.AddSelection) <> 0 Then
                        chartControl.Legends(childID).Selected = True
                    End If

                    ' AccessibleSelection.AddSelection means that the CurveLegend will be unselected.                    
                    If (selection And AccessibleSelection.RemoveSelection) <> 0 Then
                        chartControl.Legends(childID).Selected = False
                    End If
                End If
            End Sub 'SelectChild
        End Class 'ChartControlAccessibleObject

        ' Inner Class that represents a legend for a curve in the chart.
        Public Class CurveLegend
            Private m_name As String
            Private chart As ChartControl
            Private accObj As CurveLegendAccessibleObject
            Private m_selected As Boolean = True
            Private m_location As Point
            
            Public Sub New(chart As ChartControl, name As String)
                Me.chart = chart
                Me.m_name = name
            End Sub 'New

            ' Gets the accessibility object for the curve legend.            
            Public ReadOnly Property AccessibilityObject() As AccessibleObject
                Get
                    If accObj Is Nothing Then
                        accObj = New CurveLegendAccessibleObject(Me)
                    End If
                    Return accObj
                End Get
            End Property
            
            ' Gets the bounds for the curve legend.            
            Public ReadOnly Property Bounds() As Rectangle
                Get
                    Return New Rectangle(Location, Size)
                End Get
            End Property

            ' 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
            
            ' Gets the Size for the curve legend.            
            Public ReadOnly Property Size() As Size
                Get
                    Dim legendHeight As Integer = chart.Font.Height + 4
                    Dim g As Graphics = chart.CreateGraphics()
                    Dim legendWidth As Integer = CInt(g.MeasureString(Name, chart.Font).Width) + 4
                    
                    Return New Size(legendWidth, legendHeight)
                End Get
            End Property
            
            
            ' Inner class CurveLegendAccessibleObject represents accessible information 
            ' associated with the CurveLegend object.
            Public Class CurveLegendAccessibleObject
                Inherits AccessibleObject

                Private curveLegend As CurveLegend
                
                Public Sub New(curveLegend As CurveLegend)
                    Me.curveLegend = curveLegend
                End Sub 'New
                
                ' Private property that helps get the reference to the parent ChartControl.                
                Private ReadOnly Property ChartControl() As ChartControlAccessibleObject
                    Get
                        Return CType(Parent, ChartControlAccessibleObject)
                    End Get
                End Property

                ' Friend helper function that returns the ID for this CurveLegend.                
                Friend ReadOnly Property ID() As Integer
                    Get
                        Dim i As Integer
                        For i = 0 To (ChartControl.GetChildCount()) - 1
                            If ChartControl.GetChild(i) Is Me Then
                                Return i
                            End If
                        Next i
                        Return - 1
                    End Get
                End Property
                
                ' Gets the Bounds for the CurveLegend. This is used by accessibility programs.
                Public Overrides ReadOnly Property Bounds() As Rectangle
                    Get
                        ' The bounds is in screen coordinates.
                        Dim loc As Point = curveLegend.Location
                        Return New Rectangle(curveLegend.chart.PointToScreen(loc), curveLegend.Size)
                    End Get
                End Property

                ' Gets or sets the Name for the CurveLegend. This is used by accessibility programs.                
                Public Overrides Property Name() As String
                    Get
                        Return curveLegend.Name
                    End Get
                    Set
                        curveLegend.Name = value
                    End Set
                End Property
                
                ' Gets the Curve Legend Parent's Accessible object.
                ' This is used by accessibility programs.                
                Public Overrides ReadOnly Property Parent() As AccessibleObject
                    Get
                        Return curveLegend.chart.AccessibilityObject
                    End Get
                End Property
                
                ' Gets the role for the CurveLegend. This is used by accessibility programs.                
                Public Overrides ReadOnly Property Role() As AccessibleRole
                    Get
                        Return System.Windows.Forms.AccessibleRole.StaticText
                    End Get
                End Property

                ' Gets the state based on the selection for the CurveLegend. 
                ' This is used by accessibility programs.                
                Public Overrides ReadOnly Property State() As AccessibleStates
                    Get
                        Dim stateTemp As AccessibleStates = AccessibleStates.Selectable
                        If curveLegend.Selected Then
                            stateTemp = stateTemp Or AccessibleStates.Selected
                        End If
                        Return stateTemp
                    End Get
                End Property
                
                ' Navigates through siblings of this CurveLegend. This is used by accessibility programs.                
                Public Overrides Function Navigate(navdir As AccessibleNavigation) As AccessibleObject
                    ' Use the Friend NavigateFromChild helper function that exists
                    ' on ChartControlAccessibleObject.
                    Return ChartControl.NavigateFromChild(Me, navdir)
                End Function
                
                ' Selects or unselects this CurveLegend. This is used by accessibility programs.
                Public Overrides Sub [Select](selection As AccessibleSelection)

                    ' Use the internal SelectChild helper function that exists
                    ' on ChartControlAccessibleObject.
                    ChartControl.SelectChild(Me, selection)
                End Sub

            End Class 'CurveLegendAccessibleObject

        End Class 'CurveLegend

    End Class 'ChartControl

End Namespace 'ChartControlNameSpace

설명

접근성 애플리케이션이 장애가 있는 사용자에 대 한 유용성을 개선 하기 위해 애플리케이션의 기능을 조정할 수 있습니다.Accessibility applications can adjust features of the application to improve usability for users with disabilities.

시각 장애가 있는 사용자에 대 한 소프트웨어와 운영 체제의 기능을 조정할 수 있습니다.For users who are visually impaired, you can adjust software and operating system features to comply with their needs. 예를 들어, 텍스트 및 이미지를 확대 하 고 대비를 사용 하 여 렌더링할 수 있습니다.For example, you can enlarge text and images and render them with a contrast. 또한 색맹 적절 한 색 사용 하 여 사용자를 수용할 수 있습니다.In addition, you can accommodate color-blindness with the appropriate use of colors. 컴퓨터 화면의 변환 하는 화면 검토 기능을 사용 하 여 액세스할 수는 심각 하 게 시각 장애가 있는 사용자에 대 한 텍스트를 음성 이나 동적, 새로 고칠 수 있는, 브라유 점자 표시 되도록 합니다.For users who are severely visually impaired, computers are accessible with screen review aids that translate on-screen text to speech or to a dynamic, refreshable, Braille display.

청각 장애인을 위해 깜박이 도구 모음; 같은 시각 신호를 사용 하는 프로그램을 디자인할 수 있습니다. 또는 텍스트를 음성된 메시지를 표시할 수 있습니다.For users who are hard of hearing, you can design programs that use visual cues, such as a flashing toolbar; or you can display spoken messages as text. 예를 들어, 켤 때의 SoundSentry 제어판에서 내게 필요한 옵션 기능을 사용 하면 시스템 경보 사운드 때마다 시각적 경고가 표시를 제공 합니다.For example, when turned on, the SoundSentry feature, an accessibility option in Control Panel, provides a visual warning whenever the system makes an alarm sound.

동작 장애가 있는 사용자에 대 한 컴퓨터 액세스 가능성 향상을 구체화 또는 키보드 및 마우스 사용을 제거 하는 컨트롤 디자인할 수 있습니다.For users with motion disabilities, you can design controls that refine or eliminate keyboard and mouse use, thereby improving computer accessibility. 제어판 지원을 제공합니다.Control Panel offers assistance. 예를 들어, 한 가지 대안은 탐색을 위한 마우스 대신 숫자 키패드를 사용 하는 것입니다.For example, one alternative is to use the numeric keypad instead of the mouse for navigation. 라는 옵션을 StickyKeys, 없습니다 채로 두 개 이상의 키 (예: CTRL + P) 한 번에 한 번에 하나의 키를 입력 하 여 동일한 결과 얻기 위해 사용자를 사용 하도록 설정 합니다.Another option, called StickyKeys, enables users who cannot hold down two or more keys at a time (such as CTRL+P) to get the same result by typing one key at a time.

Cognitive를 사용 하 여 사용자가 있으며 언어 장애가 자신의 요구에 더 잘 맞도록 소프트웨어 프로그램을 디자인할 수 있습니다.For users with cognitive and language disabilities, you can design software programs to better accommodate their needs. 예를 들어, 이해, 표시, 적은 단어 및 초등학교 수준의 사용 하 여 이러한 사용자가 이용할 수 있습니다.For example, using conspicuous or cued sequencing, uncomplicated displays, fewer words, and a reading level targeted to elementary school standards can benefit these users.

점유 장애가 있는 사용자에 대 한 점유 요인을 패턴을 제거 하기 위해 소프트웨어 프로그램을 디자인할 수 있습니다.For users with seizure disorders, you can design software programs to eliminate seizure provoking patterns.

접근성 애플리케이션에 대 한 정보를 포함 하 여 내게 필요한 옵션에 대 한 자세한 내용은 MSDN library에서 또는 Microsoft 웹 사이트에서 Microsoft 내게 필요한 옵션에 대 한 설명서를 참조 합니다.For more information about accessibility, including information about accessibility applications, see the documentation for Microsoft Accessibility in the MSDN library or at the Microsoft Web site.

참고

사용 하는 AccessibleObject에 대 한 참조를 추가 해야 합니다는 Accessibility 와 함께 설치 되는 어셈블리는 .NET Framework.NET Framework합니다.To use the AccessibleObject, you must add a reference to the Accessibility assembly installed with the .NET Framework.NET Framework. Windows Forms Active Accessibility 2.0 지원합니다.Windows Forms only supports Active Accessibility 2.0.

상속자 참고

이 클래스에서 상속 하는 경우에 모든 멤버를 재정의할 수 있습니다.When you inherit from this class, you can override all the members.

생성자

AccessibleObject() AccessibleObject() AccessibleObject() AccessibleObject()

AccessibleObject 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the AccessibleObject class.

필드

RuntimeIDFirstItem RuntimeIDFirstItem RuntimeIDFirstItem RuntimeIDFirstItem

속성

Bounds Bounds Bounds Bounds

내게 필요한 옵션 지원 개체의 위치와 크기를 가져옵니다.Gets the location and size of the accessible object.

DefaultAction DefaultAction DefaultAction DefaultAction

개체의 기본 작업을 설명하는 문자열을 가져옵니다.Gets a string that describes the default action of the object. 모든 개체마다 기본 작업이 있는 것은 아닙니다.Not all objects have a default action.

Description Description Description Description

지정한 개체의 시각적 모양을 설명하는 문자열을 가져옵니다.Gets a string that describes the visual appearance of the specified object. 모든 개체에 설명이 있는 것은 아닙니다.Not all objects have a description.

Help Help Help Help

개체의 역할이나 개체의 사용 방법에 대한 설명을 가져옵니다.Gets a description of what the object does or how the object is used.

KeyboardShortcut KeyboardShortcut KeyboardShortcut KeyboardShortcut

액세스 가능 개체의 바로 가기 키나 선택키를 가져옵니다.Gets the shortcut key or access key for the accessible object.

Name Name Name Name

개체 이름을 가져오거나 설정합니다.Gets or sets the object name.

Parent Parent Parent Parent

내게 필요한 옵션 지원 개체의 부모를 가져옵니다.Gets the parent of an accessible object.

Role Role Role Role

이 액세스 가능성 개체의 역할을 가져옵니다.Gets the role of this accessible object.

State State State State

이 액세스 가능 개체의 상태를 가져옵니다.Gets the state of this accessible object.

Value Value Value Value

액세스 가능 개체의 값을 가져오거나 설정합니다.Gets or sets the value of an accessible object.

메서드

CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

원격 개체와 통신하는 데 사용되는 프록시 생성에 필요한 모든 관련 정보가 들어 있는 개체를 만듭니다.Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
DoDefaultAction() DoDefaultAction() DoDefaultAction() DoDefaultAction()

이 액세스 가능 개체에 연결된 기본 동작을 수행합니다.Performs the default action associated with this accessible object.

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

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetChild(Int32) GetChild(Int32) GetChild(Int32) GetChild(Int32)

지정된 인덱스에 해당하는 액세스 가능한 자식을 검색합니다.Retrieves the accessible child corresponding to the specified index.

GetChildCount() GetChildCount() GetChildCount() GetChildCount()

액세스 가능한 개체에 속하는 자식 수를 검색합니다.Retrieves the number of children belonging to an accessible object.

GetFocused() GetFocused() GetFocused() GetFocused()

키보드 포커스를 갖는 개체를 검색합니다.Retrieves the object that has the keyboard focus.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

기본 해시 함수로 작동합니다.Serves as the default hash function.

(Inherited from Object)
GetHelpTopic(String) GetHelpTopic(String) GetHelpTopic(String) GetHelpTopic(String)

도움말 항목 식별자에 대한 식별자와 이 액세스 가능 개체에 연결된 도움말 파일의 경로를 가져옵니다.Gets an identifier for a Help topic identifier and the path to the Help file associated with this accessible object.

GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

이 인스턴스의 수명 정책을 제어하는 현재의 수명 서비스 개체를 검색합니다.Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetSelected() GetSelected() GetSelected() GetSelected()

현재 선택된 자식을 검색합니다.Retrieves the currently selected child.

GetType() GetType() GetType() GetType()

현재 인스턴스의 Type을 가져옵니다.Gets the Type of the current instance.

(Inherited from Object)
HitTest(Int32, Int32) HitTest(Int32, Int32) HitTest(Int32, Int32) HitTest(Int32, Int32)

지정된 화면 좌표에 있는 자식 개체를 검색합니다.Retrieves the child object at the specified screen coordinates.

InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

이 인스턴스의 수명 정책을 제어하는 수명 서비스 개체를 가져옵니다.Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.Creates a shallow copy of the current Object.

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

현재 MarshalByRefObject 개체의 단순 복사본을 만듭니다.Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
Navigate(AccessibleNavigation) Navigate(AccessibleNavigation) Navigate(AccessibleNavigation) Navigate(AccessibleNavigation)

다른 내게 필요한 옵션 지원 개체를 탐색합니다.Navigates to another accessible object.

RaiseAutomationNotification(AutomationNotificationKind, AutomationNotificationProcessing, String) RaiseAutomationNotification(AutomationNotificationKind, AutomationNotificationProcessing, String) RaiseAutomationNotification(AutomationNotificationKind, AutomationNotificationProcessing, String) RaiseAutomationNotification(AutomationNotificationKind, AutomationNotificationProcessing, String)

UI 자동화 알림 이벤트를 발생시킵니다.Raises the UI automation notification event.

RaiseLiveRegionChanged() RaiseLiveRegionChanged() RaiseLiveRegionChanged() RaiseLiveRegionChanged()

LiveRegionChanged UI 자동화 이벤트를 발생시킵니다.Raises the LiveRegionChanged UI automation event.

Select(AccessibleSelection) Select(AccessibleSelection) Select(AccessibleSelection) Select(AccessibleSelection)

선택을 수정하거나 액세스 가능 개체의 키보드 포커스를 이동합니다.Modifies the selection or moves the keyboard focus of the accessible object.

ToString() ToString() ToString() ToString()

현재 개체를 나타내는 문자열을 반환합니다.Returns a string that represents the current object.

(Inherited from Object)
UseStdAccessibleObjects(IntPtr) UseStdAccessibleObjects(IntPtr) UseStdAccessibleObjects(IntPtr) UseStdAccessibleObjects(IntPtr)

개체의 핸들을 기준으로 AccessibleObject의 인스턴스와 개체를 연결합니다.Associates an object with an instance of an AccessibleObject based on the handle of the object.

UseStdAccessibleObjects(IntPtr, Int32) UseStdAccessibleObjects(IntPtr, Int32) UseStdAccessibleObjects(IntPtr, Int32) UseStdAccessibleObjects(IntPtr, Int32)

개체의 개체 ID와 핸들을 기준으로 AccessibleObject의 인스턴스와 개체를 연결합니다.Associates an object with an instance of an AccessibleObject based on the handle and the object id of the object.

명시적 인터페이스 구현

IAccessible.accChildCount IAccessible.accChildCount IAccessible.accChildCount IAccessible.accChildCount

이 개체에 속한 자식 인터페이스의 수를 가져옵니다.Gets the number of child interfaces that belong to this object. 이 멤버에 대한 설명은 accChildCount를 참조하세요.For a description of this member, see accChildCount.

IAccessible.accDoDefaultAction(Object) IAccessible.accDoDefaultAction(Object) IAccessible.accDoDefaultAction(Object) IAccessible.accDoDefaultAction(Object)

지정된 개체의 기본 동작을 수행합니다.Performs the specified object's default action. 모든 개체마다 기본 작업이 있는 것은 아닙니다.Not all objects have a default action. 이 멤버에 대한 설명은 accDoDefaultAction(Object)를 참조하세요.For a description of this member, see accDoDefaultAction(Object).

IAccessible.accFocus IAccessible.accFocus IAccessible.accFocus IAccessible.accFocus

키보드 포커스를 갖는 개체를 가져옵니다.Gets the object that has the keyboard focus. 이 멤버에 대한 설명은 accFocus를 참조하세요.For a description of this member, see accFocus.

IAccessible.accHitTest(Int32, Int32) IAccessible.accHitTest(Int32, Int32) IAccessible.accHitTest(Int32, Int32) IAccessible.accHitTest(Int32, Int32)

지정된 화면 좌표의 자식 개체를 가져옵니다.Gets the child object at the specified screen coordinates. 이 멤버에 대한 설명은 accHitTest(Int32, Int32)를 참조하세요.For a description of this member, see accHitTest(Int32, Int32).

IAccessible.accLocation(Int32, Int32, Int32, Int32, Object) IAccessible.accLocation(Int32, Int32, Int32, Int32, Object) IAccessible.accLocation(Int32, Int32, Int32, Int32, Object) IAccessible.accLocation(Int32, Int32, Int32, Int32, Object)

개체의 현재 화면 위치를 가져옵니다.Gets the object's current screen location. 이 멤버에 대한 설명은 accLocation(Int32, Int32, Int32, Int32, Object)를 참조하세요.For a description of this member, see accLocation(Int32, Int32, Int32, Int32, Object).

IAccessible.accNavigate(Int32, Object) IAccessible.accNavigate(Int32, Object) IAccessible.accNavigate(Int32, Object) IAccessible.accNavigate(Int32, Object)

현재 개체를 기준으로 액세스 가능한 개체를 탐색합니다.Navigates to an accessible object relative to the current object. 이 멤버에 대한 설명은 accNavigate(Int32, Object)를 참조하세요.For a description of this member, see accNavigate(Int32, Object).

IAccessible.accParent IAccessible.accParent IAccessible.accParent IAccessible.accParent

이 개체의 액세스 가능한 부모 개체를 가져옵니다.Gets the parent accessible object of this object. 이 멤버에 대한 설명은 accParent를 참조하세요.For a description of this member, see accParent.

IAccessible.accSelect(Int32, Object) IAccessible.accSelect(Int32, Object) IAccessible.accSelect(Int32, Object) IAccessible.accSelect(Int32, Object)

선택을 수정하거나 액세스 가능 개체의 키보드 포커스를 이동합니다.Modifies the selection or moves the keyboard focus of the accessible object. 이 멤버에 대한 설명은 accSelect(Int32, Object)를 참조하세요.For a description of this member, see accSelect(Int32, Object).

IAccessible.accSelection IAccessible.accSelection IAccessible.accSelection IAccessible.accSelection

액세스 가능한 개체의 선택된 자식 개체를 가져옵니다.Gets the selected child objects of an accessible object. 이 멤버에 대한 설명은 accSelection를 참조하세요.For a description of this member, see accSelection.

IAccessible.get_accChild(Object) IAccessible.get_accChild(Object) IAccessible.get_accChild(Object) IAccessible.get_accChild(Object)

지된 자식 개체를 검색합니다.Retrieves a specified child object.

IAccessible.get_accDefaultAction(Object) IAccessible.get_accDefaultAction(Object) IAccessible.get_accDefaultAction(Object) IAccessible.get_accDefaultAction(Object)

지정된 개체의 기본 작업을 나타내는 문자열을 반환합니다.Returns a string that indicates the specified object's default action.

IAccessible.get_accDescription(Object) IAccessible.get_accDescription(Object) IAccessible.get_accDescription(Object) IAccessible.get_accDescription(Object)

지정한 내게 필요한 옵션 지원 개체의 시각적 모양을 설명하는 문자열을 반환합니다.Returns a string that describes the visual appearance of the specified accessible object.

IAccessible.get_accHelp(Object) IAccessible.get_accHelp(Object) IAccessible.get_accHelp(Object) IAccessible.get_accHelp(Object)

지정된 내게 필요한 옵션 지원 개체와 연결된 WinHelp 파일의 전체 경로를 검색합니다.Retrieves the full path of the WinHelp file that is associated with the specified accessible object.

IAccessible.get_accHelpTopic(String, Object) IAccessible.get_accHelpTopic(String, Object) IAccessible.get_accHelpTopic(String, Object) IAccessible.get_accHelpTopic(String, Object)

파일에서 특정 항목의 식별자와 함께 지정된 개체와 연결된 WinHelp 파일의 전체 경로를 검색합니다.Retrieves the full path of a WinHelp file that is associated with the specified object along with the identifier of a specific topic in the file.

IAccessible.get_accKeyboardShortcut(Object) IAccessible.get_accKeyboardShortcut(Object) IAccessible.get_accKeyboardShortcut(Object) IAccessible.get_accKeyboardShortcut(Object)

지정된 개체의 바로 가기 키 또는 액세스 키를 검색합니다.Retrieves the specified object's keyboard shortcut or access key.

IAccessible.get_accName(Object) IAccessible.get_accName(Object) IAccessible.get_accName(Object) IAccessible.get_accName(Object)

지정된 개체의 이름을 검색합니다.Retrieves the name of the specified object.

IAccessible.get_accRole(Object) IAccessible.get_accRole(Object) IAccessible.get_accRole(Object) IAccessible.get_accRole(Object)

지정된 개체의 역할을 설명하는 정보를 검색합니다.Retrieves information that describes the role of the specified object.

IAccessible.get_accState(Object) IAccessible.get_accState(Object) IAccessible.get_accState(Object) IAccessible.get_accState(Object)

지정된 내게 필요한 옵션 지원 개체의 현재 상태를 검색합니다.Retrieves the current state of the specified accessible object.

IAccessible.get_accValue(Object) IAccessible.get_accValue(Object) IAccessible.get_accValue(Object) IAccessible.get_accValue(Object)

지정된 내게 필요한 옵션 지원 개체의 값을 검색합니다.Retrieves the value of the specified accessible object. 모든 개체에 값이 있는 것은 아닙니다.Not all objects have a value.

IAccessible.set_accName(Object, String) IAccessible.set_accName(Object, String) IAccessible.set_accName(Object, String) IAccessible.set_accName(Object, String)

지정된 요소에 새 액세스 가능한 이름을 할당합니다.Assigns a new accessible name to the specified element.

IAccessible.set_accValue(Object, String) IAccessible.set_accValue(Object, String) IAccessible.set_accValue(Object, String) IAccessible.set_accValue(Object, String)

지정된 요소에 새 값을 할당합니다.Assigns a new value to the specified element.

IReflect.GetField(String, BindingFlags) IReflect.GetField(String, BindingFlags) IReflect.GetField(String, BindingFlags) IReflect.GetField(String, BindingFlags)

지정된 필드 및 바인딩 플래그에 해당하는 FieldInfo 개체를 가져옵니다.Gets the FieldInfo object corresponding to the specified field and binding flag. 이 멤버에 대한 설명은 GetField(String, BindingFlags)를 참조하세요.For a description of this member, see GetField(String, BindingFlags).

IReflect.GetFields(BindingFlags) IReflect.GetFields(BindingFlags) IReflect.GetFields(BindingFlags) IReflect.GetFields(BindingFlags)

현재 클래스의 모든 필드에 해당하는 FieldInfo 개체의 배열을 가져옵니다.Gets an array of FieldInfo objects corresponding to all fields of the current class. 이 멤버에 대한 설명은 GetFields(BindingFlags)를 참조하세요.For a description of this member, see GetFields(BindingFlags).

IReflect.GetMember(String, BindingFlags) IReflect.GetMember(String, BindingFlags) IReflect.GetMember(String, BindingFlags) IReflect.GetMember(String, BindingFlags)

모든 public 멤버나 지정된 이름과 일치하는 이름을 가진 모든 멤버에 해당하는 MemberInfo 개체의 배열을 가져옵니다.Gets an array of MemberInfo objects corresponding to all public members or to all members that match a specified name. 이 멤버에 대한 설명은 GetMember(String, BindingFlags)를 참조하세요.For a description of this member, see GetMember(String, BindingFlags).

IReflect.GetMembers(BindingFlags) IReflect.GetMembers(BindingFlags) IReflect.GetMembers(BindingFlags) IReflect.GetMembers(BindingFlags)

모든 public 멤버나 현재 클래스의 모든 멤버에 해당하는 MemberInfo 개체의 배열을 가져옵니다.Gets an array of MemberInfo objects corresponding either to all public members or to all members of the current class. 이 멤버에 대한 설명은 GetMembers(BindingFlags)를 참조하세요.For a description of this member, see GetMembers(BindingFlags).

IReflect.GetMethod(String, BindingFlags) IReflect.GetMethod(String, BindingFlags) IReflect.GetMethod(String, BindingFlags) IReflect.GetMethod(String, BindingFlags)

지정된 검색 제약 조건에 지정된 메서드에 해당하는 MethodInfo 개체를 가져옵니다.Gets a MethodInfo object corresponding to a specified method under specified search constraints. 이 멤버에 대한 설명은 GetMethod(String, BindingFlags)를 참조하세요.For a description of this member, see GetMethod(String, BindingFlags).

IReflect.GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) IReflect.GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) IReflect.GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) IReflect.GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])

오버로드된 메서드 중에서 선택할 형식 배열을 사용하여 지정된 메서드에 해당하는 MethodInfo 개체를 가져옵니다.Gets a MethodInfo object corresponding to a specified method, using a Type array to choose from among overloaded methods. 이 멤버에 대한 설명은 GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])를 참조하세요.For a description of this member, see GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]).

IReflect.GetMethods(BindingFlags) IReflect.GetMethods(BindingFlags) IReflect.GetMethods(BindingFlags) IReflect.GetMethods(BindingFlags)

모든 public 메서드나 현재 클래스의 모든 메서드가 포함된 MethodInfo 개체의 배열을 가져옵니다.Gets an array of MethodInfo objects with all public methods or all methods of the current class. 이 멤버에 대한 설명은 GetMethods(BindingFlags)를 참조하세요.For a description of this member, see GetMethods(BindingFlags).

IReflect.GetProperties(BindingFlags) IReflect.GetProperties(BindingFlags) IReflect.GetProperties(BindingFlags) IReflect.GetProperties(BindingFlags)

모든 public 속성이나 현재 클래스의 모든 속성에 해당하는 PropertyInfo 개체의 배열을 가져옵니다.Gets an array of PropertyInfo objects corresponding to all public properties or to all properties of the current class. 이 멤버에 대한 설명은 GetProperties(BindingFlags)를 참조하세요.For a description of this member, see GetProperties(BindingFlags).

IReflect.GetProperty(String, BindingFlags) IReflect.GetProperty(String, BindingFlags) IReflect.GetProperty(String, BindingFlags) IReflect.GetProperty(String, BindingFlags)

지정된 검색 제약 조건에 지정된 속성에 해당하는 PropertyInfo 개체를 가져옵니다.Gets a PropertyInfo object corresponding to a specified property under specified search constraints. 이 멤버에 대한 설명은 GetProperty(String, BindingFlags)를 참조하세요.For a description of this member, see GetProperty(String, BindingFlags).

IReflect.GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) IReflect.GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) IReflect.GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) IReflect.GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

지정된 속성에 해당하는 PropertyInfo 개체를 지정된 검색 제약 조건을 사용하여 가져옵니다.Gets a PropertyInfo object corresponding to a specified property with specified search constraints. 이 멤버에 대한 설명은 GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])를 참조하세요.For a description of this member, see GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]).

IReflect.InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) IReflect.InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) IReflect.InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) IReflect.InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])

지정된 멤버를 호출합니다.Invokes a specified member. 이 멤버에 대한 설명은 InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])를 참조하세요.For a description of this member, see InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]).

IReflect.UnderlyingSystemType IReflect.UnderlyingSystemType IReflect.UnderlyingSystemType IReflect.UnderlyingSystemType

IReflect 개체를 나타내는 내부 형식을 가져옵니다.Gets the underlying type that represents the IReflect object. 이 멤버에 대한 설명은 UnderlyingSystemType를 참조하세요.For a description of this member, see UnderlyingSystemType.

적용 대상