简体   繁体   中英

UWP Vertical ScrollBar doesn't show up

I have a grid which contains several rows. In every row ther's some information. When clicking on a button on row=1 it expands and the lower part in my app is collapsed. I tried to add a scrollviewer but still it is not shown. Here is my part of code where I add the scrollbar:

<Grid Background="LightSalmon" ScrollViewer.VerticalScrollBarVisibility="Visible"
      ScrollViewer.IsVerticalRailEnabled="True"
      ScrollViewer.VerticalScrollMode="Enabled">



    <Grid.RowDefinitions>
        <RowDefinition Height="auto"/>
        <RowDefinition Height="auto"/>
        <RowDefinition Height="auto"/>
        <RowDefinition Height="auto"/>
        <RowDefinition Height="auto"/>
        <RowDefinition Height="auto"/>
    </Grid.RowDefinitions>



</Grid>

The Grid does not scroll on its own, no matter what ScrollViewer attached properties you use. Remove all the ScrollViewer attached properties and put the Grid into a ScrollViewer .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM