Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

IModelLayoutItem.MaxSize Property

Specifies the layout item’s maximum size.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

Size MaxSize { get; set; }

Property Value

Type Description
Size

A System.Drawing.Size object that specifies the maximum size of the layout item.

Remarks

This property value is passed to the LayoutControlItem.MaxSize property. If using the MaxSize property produces unexpected effects, use the Control.MaximumSize property as shown below.

using System;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
using System.Windows.Forms;
//...
public class MyController : ViewController <DetailView> {
    //...
    protected override void OnActivated() {
        base.OnActivated();
        ViewItem item = View.FindItem("FullName");
        item.ControlCreated += Item_ControlCreated;
    }
    private void Item_ControlCreated(object sender, EventArgs e) {
        ((ViewItem)sender).ControlCreated -= Item_ControlCreated;
        ((Control)((ViewItem)sender).Control).MaximumSize = new System.Drawing.Size(300, 0);
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MaxSize property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also