ToolStripItem.Available 屬性


取得或設定值,指出 ToolStripItem 是否應該置於 ToolStrip 上。Gets or sets a value indicating whether the ToolStripItem should be placed on a ToolStrip.

 property bool Available { bool get(); void set(bool value); };
public bool Available { get; set; }
member this.Available : bool with get, set
Public Property Available As Boolean


如果 true 置於 ToolStripItem 上則為 ToolStrip,否則為 falsetrue if the ToolStripItem is placed on a ToolStrip; otherwise, false.



[Available] 屬性與中的 [Visible] 屬性不同,Available 指出是否顯示 ToolStripItem,而 [Visible] 則指出是否顯示 ToolStripItem 和其父系。The Available property is different from the Visible property in that Available indicates whether the ToolStripItem is shown, while Visible indicates whether the ToolStripItem and its parent are shown. AvailableVisible 設定為 truefalse 會將另一個屬性設定為 truefalseSetting either Available or Visible to true or false sets the other property to true or false.