Understand silverlight grid units..
OK Let me explain u grid unit types , There are three types of Units available in silverlight grid for managing layouts .
1.Pixel
2.Auto
3.Star
1.Pixel
All of us are familiar with Pixels, Pixels are used for absolute dimension where we need fixed column or row.
2.Auto
we use Auto to increase or decrease grid column or row according to the content place with in.
For example, take a grid with three rows take first row auto place any UI element(TextBlock,TextBox,Ellipse etc..) in first row u will see that your row height increases according to that ui element dimensions.
3.Star
Star unit is very usefull in case where we need to use any of the available space.
For example, we are going to build a basic Player structure using a grid unit Star.
So, take a grid make two rows with in first one will star second with abolute postion in pixels almost 50 Px place a rectangle in first row and another rectangle in second row both with different fill colors preview with in browser now resize your browser note that rectangl on first row will resize itself in available space .


Subscribe by RSS