Share via

Issue with ScrollView

Ronald Rex 1,671 Reputation points
2023-04-18T13:27:35.5066667+00:00

Hi Friends, I was wondering how do you keep a (Row) in a Grid Layout fixed during scrolling? In my case I want to keep Row(0) where I have a Header Row fixed (Meaning they cannot resize the window and scroll this particular Row in the Grid, while the user can resize window and Scroll the other Rows. Thanks !!!!


 <ScrollView HorizontalScrollBarVisibility="Always" >
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>
            <!--Row 0-->

            <controls:PayerHeader Grid.Row="0"  />

Developer technologies | .NET | .NET Multi-platform App UI
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


Answer accepted by question author

Lloyd Sheen 1,491 Reputation points
2023-04-19T15:03:21.6966667+00:00

Don't think it has to do with versions. What you need to do is have the "header" outside the ScrollView so that you would have something like a Grid with two rows. The first row will house the header and the second will house the ScrollView. Then you can scroll the other items and the header will remain at the top.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.