Quantcast
Channel: Grid and Canvas
Viewing all articles
Browse latest Browse all 6

Grid and Canvas

$
0
0
The Grid can be used with only one row and one column. You can certainly use it along with the ZIndex property to control ordering.

A Canvas could be used in the same way. Grids are good when you want the content to size to fit in some way (like adjusting a child's size based on the parent by setting margins for example). A Canvas is absolute -- the content (children) won't size to fit and always appear where you specify them, relative to the Canvas upper left corner.

Whereas the grid can size to fit the children, a canvas does not.

A canvas, all things being equal, should be faster as it doesn't do any calculations for sizing, etc. It just places the children as specified, or defaults to 0,0.

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>