Shape.AccessibleName 屬性
取得或設定協助工具用戶端應用程式所使用之控制項的名稱。
命名空間: Microsoft.VisualBasic.PowerPacks
組件: Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)
語法
'宣告
<BrowsableAttribute(True)> _
Public Property AccessibleName As String
[BrowsableAttribute(true)]
public string AccessibleName { get; set; }
[BrowsableAttribute(true)]
public:
property String^ AccessibleName {
String^ get ();
void set (String^ value);
}
[<BrowsableAttribute(true)>]
member AccessibleName : string with get, set
function get AccessibleName () : String
function set AccessibleName (value : String)
屬性值
類型:String
AString代表之控制項的協助工具用戶端應用程式所使用的名稱。The default is a null reference (Nothing in Visual Basic).
備註
AccessibleName屬性是簡短描述,並識別其容器中的物件的標籤。 例如,可能會有圖形AccessibleName"小橢圓形"或"藍色方形"。可能有一條線AccessibleName"垂直線"或"對角線紅線 」。
範例
下列範例示範如何設定AccessibleName和AccessibleDescription屬性OvalShape控制項。 假設您已加入名為"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";
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.VisualBasic.PowerPacks 命名空間
其他資源
如何:使用 LineShape 控制項繪製線條 (Visual Studio)