.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

IModelLayoutItem.MaxSize Property

Specifies the layout item's maximum size.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v20.2.dll


Size MaxSize { get; set; }
Property MaxSize As Size

Property Value

Type Description

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


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() {
        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);
See Also