ToolStrip.DefaultSize ToolStrip.DefaultSize ToolStrip.DefaultSize ToolStrip.DefaultSize Property

定义

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

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

属性值

Size 的默认 ToolStripThe default Size of the ToolStrip.

注解

DefaultSize属性表示Size的值ToolStrip最初创建时。The DefaultSize property represents the Size value of the ToolStrip when it is initially created. 您可以调整的大小ToolStrip通过设置其PreferredSize属性值。You can adjust the size of the ToolStrip by setting its PreferredSize property value.

备注

若要维护更好的性能,未设置SizeToolStrip其构造函数中。To maintain better performance, do not set the Size of a ToolStrip in its constructor. 相反,重写DefaultSize属性。Instead, override the DefaultSize property.

继承者说明

重写时DefaultSize派生类中的属性,它是更可取的方法返回Size使用首选的维度,而无需重写所有实现。When overriding the DefaultSize property in a derived class, it is preferable to return a Size with the preferred dimensions rather than overriding all the implementation.

适用于