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)
屬性值
型別:System.String
A String表示協助工具用戶端應用程式所使用之控制項的名稱。預設值為 null 參考 (在 Visual Basic 中為 Nothing)。
備註
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 命名空間
其他資源
HOW TO:使用 LineShape 控制項繪製線條 (Visual Studio)
HOW TO:使用 OvalShape 和 RectangleShape 控制項繪製圖案 (Visual Studio)