Absolute sizing assigns rows or columns fixed dimensions in device-independent units (DIUs), making controls such as calculator buttons consistent in size across screen dimensions. section 5.1.3
Use absolute sizing to:
- Specify each column’s width and each row’s height directly. section 5.1.3
- Combine fixed button dimensions with proportional sizing for remaining screen space. section 5.1.3
- Center a fixed-size Grid when a desktop window becomes wider than the design. section 5.1.3
MauiCalc button grid
Set ColumnDefinitions to "100,100,100,100" and RowDefinitions to "*,100,100,100,100". The screen row expands into remaining height while the four button rows and columns remain 100 DIUs, producing square buttons on phone and desktop. section 5.1.3
Listing 5.11 MauiCalc with fixed height and width buttons
<Grid ColumnDefinitions="100,100,100,100" #1
RowDefinitions="*,100,100,100,100" #2
HorizontalOptions="Center" #3
RowSpacing="2"
ColumnSpacing="2">
Inspect the complete Grid definition for fixed-height and fixed-width MauiCalc buttons. section 5.1.3
