Class MenuScrollPolicy
Pure decision rule for menu option scrolling: a menu clamps its options area to the configured number of visible rows (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.Menu.Domain.Entities
Assembly: Serenity.Menu.Domain.dll
Syntax
public static class MenuScrollPolicy
Methods
ShouldScroll(bool, int, int)
Determines whether a menu 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 menu definition enables scrolling. |
| int | optionsCount | Total number of options in the menu. |
| 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 |