ToolStripItem.Bounds 属性
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取项的大小和位置。
public:
virtual property System::Drawing::Rectangle Bounds { System::Drawing::Rectangle get(); };
C#
[System.ComponentModel.Browsable(false)]
public virtual System.Drawing.Rectangle Bounds { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Bounds : System.Drawing.Rectangle
Public Overridable ReadOnly Property Bounds As Rectangle
一个 Rectangle,它表示 ToolStripItem 的大小和位置。
- 属性
使用 Bounds 属性确定 . 的大小和位置 ToolStripItem。
与其他控件不同, ToolStripItem 没有属性可用于设置 ToolStripItem 相对于左上角的 ToolStrip左上角。 如果需要设置绝对 ToolStripItem位置,则必须重写 ToolStrip 并定义该方法的 SetItemLocation 自定义实现。
产品 | 版本 |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |