CardViewPagerState.SettingsBreakpointsLayout Property
Provides access to the Card View’s Breakpoint layout mode settings.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Property Value
Type | Description |
---|---|
CardViewBreakpointsLayoutSettings | A CardViewBreakpointsLayoutSettings object containing the Card View’s Breakpoint layout mode settings. |
Remarks
Use the SettingsBreakpointsLayout property to access the Card View settings related to the Breakpoints layout mode (the CardViewModel.LayoutMode property is set to Layout.Breakpoints).
Refer to the Adaptivity topic for more information.
Online Demo
Example
The following example illustrates how to implement three different layout scenarios for three different browser sizes (Small, Medium, Large) as shown on the image below.
@Html.DevExpress().CardView(settings => {
...
settings.Settings.LayoutMode = DevExpress.Web.Layout.Breakpoints;
settings.SettingsAdaptivity.BreakpointsLayoutSettings.CardsPerRow = 5;
settings.SettingsAdaptivity.BreakpointsLayoutSettings.Breakpoints.Add(BreakpointsLayoutDeviceSizes.Small, 3);
settings.SettingsAdaptivity.BreakpointsLayoutSettings.Breakpoints.Add(BreakpointsLayoutDeviceSizes.Custom, 1300, 4);
...
}).Bind(Model).GetHtml()
See Also