10 references to Clamp
Microsoft.Maui (8)
Layouts\GridLayoutManager.cs (8)
208
var column = _grid.GetColumn(view).
Clamp
(0, _columns.Length - 1);
209
var columnSpan = _grid.GetColumnSpan(view).
Clamp
(1, _columns.Length - column);
218
var row = _grid.GetRow(view).
Clamp
(0, _rows.Length - 1);
219
var rowSpan = _grid.GetRowSpan(view).
Clamp
(1, _rows.Length - row);
252
var firstColumn = _grid.GetColumn(view).
Clamp
(0, _columns.Length - 1);
253
var columnSpan = _grid.GetColumnSpan(view).
Clamp
(1, _columns.Length - firstColumn);
256
var firstRow = _grid.GetRow(view).
Clamp
(0, _rows.Length - 1);
257
var rowSpan = _grid.GetRowSpan(view).
Clamp
(1, _rows.Length - firstRow);
Microsoft.Maui.Controls (2)
Picker\Picker.cs (2)
238
return picker.Items == null ? -1 : ((int)value).
Clamp
(-1, picker.Items.Count - 1);
370
var newIndex = SelectedIndex.
Clamp
(-1, Items.Count - 1);