Scroll view mistakes

135 views Asked by At

I'm using MS Visual Studio 2013. My project is for Windows universal app. I have one problem, my scroll view doesn't work. This is my code:

<ScrollViewer
    Height="8000"
    VerticalAlignment="Top" 
    VerticalScrollBarVisibility="Visible" 
    VerticalScrollMode="Enabled" 
    AllowDrop="False"
    BringIntoViewOnFocusChange="True" 
    HorizontalScrollMode="Disabled" 
    IsHoldingEnabled="True" >
        <Grid>

    <TextBlock
                HorizontalAlignment="Left" 
                Margin="108,87,0,0" 
                TextWrapping="Wrap"
                Text="Total points:" 
                VerticalAlignment="Top" 
                FontSize="30" 
                Width="176"/>

    <TextBlock 
                x:Name="points" 
                HorizontalAlignment="Left"
                Margin="284,87,0,0" 
                TextWrapping="Wrap"
                Text="0"
                VerticalAlignment="Top" 
                FontSize="30"
                Width="59" 
                RenderTransformOrigin="3.136,-1.343"/>

    <Image
                HorizontalAlignment="Left"
                Height="56" 
                Margin="322,67,0,0"
                VerticalAlignment="Top"
                Width="48"
                Source="Assets/cup.jpg" 
                Stretch="Fill"/>

</Grid>
</ScrollViewer>

2

There are 2 answers

0
Olaru Mircea On BEST ANSWER

That ScrollViewer Height is way too big. Shrink it to 50 and see the result. Just for test, i am not sure what the container for this is. I see you are working with strange margins, don't try to drag and drop items but define them by hand and you will get better arranging.

0
ReeganLourduraj On

could you change HorizontalScrollBarVisibility="Auto" and horizontalscrollmode="Enabled". Change your height also.