Class ModalScrollPolicy
Pure decision rule for modal option scrolling: a modal clamps its options area to the configured number of visible options (and scrolls the rest) only when scrolling is enabled, the visible count is meaningful, and there actually are more options than fit.
Inherited Members
Namespace: Serenity.Modal.Domain.Entities
Assembly: Serenity.Modal.Domain.dll
Syntax
public static class ModalScrollPolicy
Remarks
Mirrors Serenity.Menu.Domain.Entities.MenuScrollPolicy so modal scrolling behaves identically
to menu scrolling.
Methods
ShouldScroll(bool, int, int)
Determines whether a modal should clamp its options area and scroll the overflow.
Declaration
public static bool ShouldScroll(bool scrollable, int optionsCount, int visibleOptionsCount)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | scrollable | Whether the modal definition enables scrolling. |
| int | optionsCount | Total number of options in the modal. |
| int | visibleOptionsCount | Configured number of options visible at once; 0 or less disables clamping. |
Returns
| Type | Description |
|---|---|
| bool | True when the options area must clamp to |