次の方法で共有


Shape.AccessibleDescription プロパティ

更新 : 2007 年 11 月

ユーザー補助クライアント アプリケーションによって使用される、コントロールの説明を取得または設定します。

名前空間 :  Microsoft.VisualBasic.PowerPacks
アセンブリ :  Microsoft.VisualBasic.PowerPacks.Vs (Microsoft.VisualBasic.PowerPacks.Vs.dll 内)

構文

'宣言
<BrowsableAttribute(True)> _
Public Property AccessibleDescription As String
'使用
Dim instance As Shape
Dim value As String

value = instance.AccessibleDescription

instance.AccessibleDescription = value
[BrowsableAttribute(true)]
public string AccessibleDescription { get; set; }
[BrowsableAttribute(true)]
public:
property String^ AccessibleDescription {
    String^ get ();
    void set (String^ value);
}
public function get AccessibleDescription () : String
public function set AccessibleDescription (value : String)

プロパティ値

型 : System.String

ユーザー補助クライアント アプリケーションによって使用される、コントロールの説明が含まれる String。既定値は null 参照 (Visual Basic では Nothing) です。

解説

AccessibleDescription プロパティは、オブジェクトの外観に関するテキスト形式の説明を提供します。この説明は、主に、視力の弱いユーザーや視覚障害があるユーザーのために大きなコンテキストを提供するために使用しますが、コンテキスト検索やその他のアプリケーションでも使用できます。

AccessibleDescription プロパティは、説明が明白でない場合や、オブジェクトの AccessibleName または AccessibleRole では説明が冗長な場合に必要です。たとえば、"ここをクリック" というテキストを表示する図形は追加情報を必要としませんが、サボテンの絵柄の図形の場合は必要になります。サボテンの図形については、AccessibleName プロパティと AccessibleRole プロパティがその用途を説明しますが、"サボテンの絵が表示された図形" などのあまり具体的ではない情報は、AccessibleDescription プロパティが提供します。

ユーザー補助オブジェクトのプロパティの詳細については、MSDN ライブラリの「Active Accessibility」にある「Content of Descriptive Properties」を参照してください。

OvalShape コントロールの AccessibleName プロパティと AccessibleDescription プロパティを設定する方法を次のコード例に示します。ここでは、"cactus" という名前の画像ファイルがリソースとしてプロジェクトに追加されていると仮定します。

Dim OvalShape1 As New OvalShape
Dim canvas As New ShapeContainer
' Set the form as the parent of the ShapeContainer.
canvas.Parent = Me
' Set the ShapeContainer as the parent of the OvalShape.
OvalShape1.Parent = canvas
' Assign an image resource to the BackgroundImage property.
OvalShape1.BackgroundImage = My.Resources.cactus
OvalShape1.Size = New Size(My.Resources.cactus.Size)
' Assign the AccessibleName and AccessibleDescription text.
OvalShape1.AccessibleName = "Image"
OvalShape1.AccessibleDescription = "A picture of a cactus"
OvalShape OvalShape1 = new OvalShape();
ShapeContainer canvas = new ShapeContainer();
// Set the form as the parent of the ShapeContainer.
canvas.Parent = this;
// Set the ShapeContainer as the parent of the OvalShape.
OvalShape1.Parent = canvas;
// Assign an image resource to the BackgroundImage property.
OvalShape1.BackgroundImage = VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus;
OvalShape1.Size = new Size(VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus.Height, 
    VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus.Width);
// Assign the AccessibleName and AccessibleDescription text.
OvalShape1.AccessibleName = "Image";
OvalShape1.AccessibleDescription = "A picture of a cactus";

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

Shape クラス

Shape メンバ

Microsoft.VisualBasic.PowerPacks 名前空間

その他の技術情報

方法 : LineShape コントロールを使用して線を描画する (Visual Studio)

方法 : OvalShape コントロールおよび RectangleShape コントロールを使用して図形を描画する (Visual Studio)

ライン コントロールとシェイプ コントロールの概要 (Visual Studio)