Returns the width in pixels the control needs for its contents.
| C# | int Width = object.PreferredWidth; |
| VB.NET | Width = object.PreferredWidth As Integer |
| C++ | long Width = object->PreferredWidth; long Width = object->GetPreferredWidth(); |
| C | HRESULT object->get_PreferredWidth(long* Width); |
object
Width
Returns the width in pixels the control needs for its contents.
The PreferredWidth property returns the width in pixels a month calendar control needs to show all months (Calendar.MonthsAcross). p The width depends on the font, the culture and the DPI of the monitor (DPI). A calendar that sizes itself (AutoSize, the default) uses it automatically. SingleMonthWidth returns the width of one month.
See Also SftCalendar Object | Object Hierarchy | Calendar Layout