Sorry for asking an complete n00b question, but I've tried everything I can think of and nothing has worked.
Google hasn't been too useful, all the results are from ancient versions of Silverlight :(
The problem:
I've got an Silverlight User Control. The layout root is an Grid. The grid is defined so:
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="30" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<MyScrollButton Grid.Column="0" Name="LeftScroller" Width="30" Height="Auto" />
<ListBox x:Name="ScrollBox" Grid.Column="1" RenderTransformOrigin="0.5, 0.5"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ItemContainerStyle="{Binding Source={StaticResource ListBoxItemStyle}}"
ItemsSource="{Binding Source={StaticResource ControlState:myItemSource}}"
Style="{Binding Source={StaticResource ListBoxStyle}}"
HorizontalAlignment="Center"
BorderThickness="0" Width="Auto" Height="796">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
<MyScrollButton Grid.Column="2" Width="30" Height="Auto"/>
When I run this, LayoutRoot resizes correctly. It fills the browser window.
However, the child controls aren't (re)sized. MyScrollButtons and ListBox don't obtain any height, so they're not visible.
I want these controls to inherit their height from the parent. They should be 100% of the height of the page.
I've tried:
- Entering percentages in heights. Invalid.
- Binding height to LayoutRoot's height with help from Blend 3. Makes no difference.
- Entering * as the height. Invalid.
For the 'record' implementing the same functionality in Flex is (was, I'm doing this as an comparison of the two techs) really easy..