locked
Height and width in % RRS feed

  • Question

  • I think there should be way to give height and width in %, atleast for grid(like table in html), datagrid. Silverlight architecture should think about this option. I know by using existing silverlight it can be achieved by the different way, but what if silverlight provide this way, then designing become so easy.

    Wednesday, June 1, 2011 7:06 AM

Answers

  • Hi,

    Not sure in silverlight we use 3*,4*,3*

    Wednesday, June 1, 2011 7:16 AM
  • * works like % if ALL the rows, or columns, in your grid use it.

     

    Wednesday, June 1, 2011 8:29 AM
  • yeah, thats right we can use *.

    but i want something like <grid Height="100%"/>  Same like we use in html or asp as <table Height="100%"/>

    That will make silverlihgt designing so easy.

    Thursday, June 2, 2011 6:23 AM
  • If you want your grid to be 100% height and your grid is the layout root in your control, it will be 100% height.

    By default your controls are created this way: with a 100% height grid. 

    Thursday, June 2, 2011 7:49 AM
  • You can set VerticalAlignment="Stretch".  Make sure that you don't have any additional height constraints on the Grid and its parent controls.

    Thursday, June 2, 2011 7:54 AM
  • Thanks alot it works fine.

    Friday, June 3, 2011 1:04 AM
  • it is helpfull for me

    Tuesday, June 21, 2011 6:05 AM

All replies

  • Hi,

    Not sure in silverlight we use 3*,4*,3*

    Wednesday, June 1, 2011 7:16 AM
  • * works like % if ALL the rows, or columns, in your grid use it.

     

    Wednesday, June 1, 2011 8:29 AM
  • yeah, thats right we can use *.

    but i want something like <grid Height="100%"/>  Same like we use in html or asp as <table Height="100%"/>

    That will make silverlihgt designing so easy.

    Thursday, June 2, 2011 6:23 AM
  • If you want your grid to be 100% height and your grid is the layout root in your control, it will be 100% height.

    By default your controls are created this way: with a 100% height grid. 

    Thursday, June 2, 2011 7:49 AM
  • You can set VerticalAlignment="Stretch".  Make sure that you don't have any additional height constraints on the Grid and its parent controls.

    Thursday, June 2, 2011 7:54 AM
  • Thanks alot it works fine.

    Friday, June 3, 2011 1:04 AM
  • it is helpfull for me

    Tuesday, June 21, 2011 6:05 AM