ToolStripItem.DefaultSize ToolStripItem.DefaultSize ToolStripItem.DefaultSize ToolStripItem.DefaultSize Property

定义

获取项的默认大小。Gets the default size of the item.

protected:
 virtual property System::Drawing::Size DefaultSize { System::Drawing::Size get(); };
protected virtual System.Drawing.Size DefaultSize { get; }
member this.DefaultSize : System.Drawing.Size
Protected Overridable ReadOnly Property DefaultSize As Size

属性值

Size 的默认 ToolStripItemThe default Size of the ToolStripItem.

注解

DefaultSize属性表示ToolStripItem最初创建它时的。 SizeThe DefaultSize property represents the Size of the ToolStripItem when it is initially created. 如果属性为true, ToolStrip则将根据方向自动调整大小。 ToolStripItem AutoSizeIf the AutoSize property is true, the ToolStripItem is sized automatically in accordance with the ToolStrip orientation. 可以通过ToolStripItem AutoSize将的属性值设置为来false手动调整大小。You can manually adjust the size of the ToolStripItem by setting its AutoSize property value to false.

继承者说明

当在派生DefaultSize类中重写属性时, 最好是Size返回具有所需维度的对象, 而不是重写所有实现。When overriding the DefaultSize property in a derived class, it is preferable to return a Size object with the desired dimensions rather than overriding all the implementation.

适用于