Skip to main content
Home Forums Silverlight Design Designing with Silverlight Resolution independent designing
2 replies. Latest Post by bharathkumars87 on November 3, 2009.
(0)
rajuunni
Member
0 points
1 Posts
09-30-2009 10:43 AM |
Hi all,
We have a requirement to design our screens without providing the width and height.
Following is the scenario :
<basics:ChildWindow ....
Title="ChildWindow2" mc:Ignorable="d" d:DesignWidth="200" d:DesignHeight="100" HorizontalAlignment="Center" VerticalAlignment="Center" MinHeight="200" MinWidth="300" > <Grid x:Name="LayoutRoot" Background="White"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock TextWrapping="Wrap" LineStackingStrategy="BlockLineHeight" /> <TextBox Margin="0,3,0,46" TextWrapping="Wrap" /> </Grid>
...
Here the problem is that initially the window opens in the design time width and height. But when we start typing in to the textbox, instead of wrapping and displaying a scroll, it stretches and the window stretches along with it.
We need to achieve this without providing any height and width attributes.
Please advice..
swo
Contributor
2161 points
342 Posts
09-30-2009 10:48 AM |
Hi
Try
bharathk...
280 points
51 Posts
11-03-2009 4:24 AM |
hai raju
Try this,
Title="ChildWindow2" mc:Ignorable="d" d:DesignWidth="200" d:DesignHeight="100" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinHeight="200" MinWidth="300" > <Grid x:Name="LayoutRoot" Background="White"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock TextWrapping="Wrap" LineStackingStrategy="BlockLineHeight" /> <TextBox Margin="0,3,0,46" TextWrapping="Wrap" /> </Grid>