See the &xwp; User Guide for details.
You may configure this function on the "Grid" page in the "Workplace Shell" object.
Note:
By default, only the icons which are currently selected are moved.
If you still wish to move all the objects without having to select them,
hold down the Shift key while selecting the "Snap to grid" menu item.