Skip to main content

NavigatorBase.MinSize Property

Gets the minimum size that can be applied to the navigator.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[Browsable(false)]
public Size MinSize { get; }

Property Value

Type Description
Size

A System.Drawing.Size object representing the minimum size of the rectangular region that can be occupied by the navigator.

Remarks

The MinSize property value depends on the number of buttons displayed in the navigator and their minimum size. Each button’s size is limited by the size of its image. The MinSize property value also depends on the border style and whether the current record and the total records count are displayed. If the control displays the text, the font settings (name, size etc) affect the MinSize value also.

Note: if you set the navigator’s Size property to a value less than MinSize, Size is reset to the MinSize value .

Example

In cases when the data navigator is docked to the parent control (form, for instance), resizing the latter can hide the data navigator buttons. The following sample code declares the SetMinSize method that specifies the minimum size of the Form1 so that the DataNavigator is never truncated when the form is shrunk.

using DevExpress.XtraEditors;
// ...
// Specifies the minimum size of the Form that owns the DataNavigator control
private void SetMinSize(DataNavigator dn){
   if (!Controls.Contains(dn)) return;
   MinimumSize = dn.MinSize;
}
private void Form1_Load(object sender, System.EventArgs e) {
   SetMinSize(dataNavigator1);
}
See Also