How to freeze a row in a Grid element
Is it possible to freeze the top most row within a Silverlight Grid (not DataGrid) element? If so, could someone p开发者_如何学Crovide an example of how this can be done?
Thanks,
Xam
Consider the following structure:
In XAML define:
<Grid x:Name="LayoutRoot">
<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="77.958"/>
<RowDefinition/>
</Grid.RowDefinitions>
<ScrollViewer Margin="8,0,8,8" Grid.Row="1" Height="332.042" VerticalAlignment="Bottom">
<Grid Height="524" Width="592" HorizontalAlignment="Left" VerticalAlignment="Top" Background="#FF00DCD7"/>
</ScrollViewer>
<Grid Background="#FF8D0000"/>
</Grid>
</Grid>
It'll look like this:
The maroon part is frozen in the sense that as you scroll, it will not move.
精彩评论