Page view counter
Grid Resizing: Can grid height increase automatically as new components are added to it?
Last post 08-29-2008 2:42 AM by simbuaarumugam. 4 replies.
Sort Posts:
08-27-2008 4:38 AM
Grid Resizing: Can grid height increase automatically as new components are added to it?

Is it possible in Expression Blend that whenever any component( Grid, textbox, textblock etc. ) is added to a grid, the height increases automatically?

 

Cheers,
Balakrishnan

Whitewing_s

Loading...
Joined on 07-03-2008
Bangalore
Posts 83
08-27-2008 5:14 AM
Re: Grid Resizing: Can grid height increase automatically as new components are added to it?

The height of what?

Just incase:

The grid can have dynamic height, width:

<Grid.RowDefinitions>

 <RowDefinition Height="0.3*"/>

<RowDefinition Height="30"/>

</Grid.RowDefinitions>

the 0.3* means 30% of the height the grid has

30 means 30 pixels

 

hope this helps :)

texmex5

Loading...
Joined on 03-04-2008
Estonia
Posts 375
08-27-2008 5:46 AM
Re: Re: Grid Resizing: Can grid height increase automatically as new components are added to it?

Hi,

   Say that the height of the layoutroot is 480.. I tried to embed 5 grids each of height 150 stacked vertically( i.e in each row of the base grid).. Going by this 1 grid will lie outside the layoutroot.. My question is that how i can accomodate the 5th grid in layout root...?

In this context can u have a grid resized in height according to the number of components added to it.

I think giving * for row definition only divides the space within the grid according to the percentage..

What i need is to resize the height of the grid as i add components to it..

Cheers,
Balakrishnan

Whitewing_s

Loading...
Joined on 07-03-2008
Bangalore
Posts 83
08-29-2008 2:25 AM
Marked as Answer
Re: Grid Resizing: Can grid height increase automatically as new components are added to it?

Hello, generally speaking, you should avoid setting explicit size on Grid. If you remove the Width="something" and Height="something", the Grid will automatically adjust its size. This, however, may cause some problems in design time. So you can use the Design Time Size feature, which doesn't affect runtime. Have a look at this screenshot:

Design Time Resize 

The markup generated looks like this:

xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="247" d:DesignHeight="236"

 

Note the d:DesignWidth/Height properties. They don't affect runtime. As long as your Grid doesn't have Width/Height property, it will automatically resized along with the browser.

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.

Yi-Lun Luo - MSFT

Loading...
Joined on 10-29-2007
Posts 2,688
08-29-2008 2:42 AM
Re: Re: Grid Resizing: Can grid height increase automatically as new components are added to it?

 sure you will achieve your requirements by using story board .. when you added new Textblock or textbox etc .. must write storyboad

in that stroyboard metion

grid row definition column  definition where we can place user controls

SimbuAarumugam India
http://simbusoftwareengineer.blogspot.com
(Mark As Answer If its Satisfy your needs)

simbuaarumugam

Loading...
Joined on 07-22-2008
India-Chennai
Posts 350
Microsoft Communities