Back to Devexpress

ImageSlider.LayoutMode Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-imageslider-a4b9d000.md

latest4.6 KB
Original Source

ImageSlider.LayoutMode Property

Gets or sets the way an image is aligned within the ImageSlider container.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(ImageLayoutMode.Stretch)]
[DXCategory("Layout")]
public ImageLayoutMode LayoutMode { get; set; }
vb
<DXCategory("Layout")>
<DefaultValue(ImageLayoutMode.Stretch)>
Public Property LayoutMode As ImageLayoutMode

Property Value

TypeDefaultDescription
ImageLayoutModeStretch

An ImageLayoutMode object defining the way an image is aligned within the ImageSlider container.

|

Available values:

Show 16 items

NameDescription
TopLeft

An image is vertically aligned at the top, and horizontally aligned on the left.

| | TopCenter |

An image is vertically aligned at the top, and horizontally aligned at the center.

| | TopRight |

An image is vertically aligned at the top, and horizontally aligned on the right.

| | MiddleLeft |

An image is vertically aligned at the center, and horizontally aligned on the left.

| | MiddleCenter |

An image is horizontally and vertically aligned at the center.

| | MiddleRight |

An image is vertically aligned at the center, and horizontally aligned on the right.

| | BottomLeft |

An image is vertically aligned at the bottom, and horizontally aligned on the left.

| | BottomCenter |

An image is vertically aligned at the bottom, and horizontally aligned at the center.

| | BottomRight |

An image is vertically aligned at the bottom, and horizontally aligned on the right.

| | Stretch |

An image is stretched to fill the available client area.

| | ZoomInside |

Zooms an image proportionally so that it’s displayed within the client area in its entirety.

| | ZoomOutside |

Zooms an image proportionally, making its smaller side (width or height) to be displayed entirely. The image is centered, so the larger side (height or width) will not be displayed in its entirety.

| | StretchHorizontal |

An image is stretched horizontally.

| | StretchVertical |

An image is stretched vertically.

| | Default |

The default layout.

| | Squeeze |

An image is displayed as is, if its actual size is smaller than the size of the container. If the image size is larger than the container’s size, the image is shrunk proportionally to fit the container’s bounds.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LayoutMode 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.

winforms-grid-image-slider-cell-editor/CS/WindowsFormsApplication202/MyImageSlider.cs#L15

csharp
this.Size = new Size(200, 100);
    this.LayoutMode = DevExpress.Utils.Drawing.ImageLayoutMode.MiddleCenter;
}

winforms-grid-image-slider-cell-editor/VB/WindowsFormsApplication202/MyImageSlider.vb#L17

vb
Me.Size = New Size(200, 100)
    Me.LayoutMode = DevExpress.Utils.Drawing.ImageLayoutMode.MiddleCenter
End Sub

See Also

ImageSlider Class

ImageSlider Members

DevExpress.XtraEditors.Controls Namespace