开发者

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:

How to freeze a row in a Grid element

The maroon part is frozen in the sense that as you scroll, it will not move.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜