我的Windows Phone 8应用程序中的Scrollview正在运行。它会滚动,但是当你放开它会弹回原来的状态而不是保持新状态时,我该如何解决这个问题。
<ScrollViewer VerticalAlignment="Top" Height="515" Margin="0,253,0,0" Background="{x:Null}">
<Grid x:Name="ContentPanel" Height="619" Width="456">
<Button x:Name="Basic_But" Content="basic items" Margin="23,10,0,0" VerticalAlignment="Top" BorderBrush="{x:Null}" Foreground="#FFBAAFAD" FontSize="36" HorizontalContentAlignment="Left" Height="89" HorizontalAlignment="Left" Width="413" Click="Basic_But_Click"/>
<Button x:Name="Tools_But" Content="tools" HorizontalAlignment="Left" Margin="23,99,0,0" VerticalAlignment="Top" Width="413" BorderBrush="{x:Null}" Foreground="#FFBAAFAD" FontSize="36" HorizontalContentAlignment="Left" Height="89" Click="Tools_But_Click"/>
<Button x:Name="Weapons_But" Content="weapons + armour" HorizontalAlignment="Left" Margin="23,188,0,0" VerticalAlignment="Top" Width="413" BorderBrush="{x:Null}" Foreground="#FFBAAFAD" FontSize="36" HorizontalContentAlignment="Left" Height="89"/>
<Button x:Name="Macha_But" Content="machanical" HorizontalAlignment="Left" Margin="23,277,0,0" VerticalAlignment="Top" Width="413" BorderBrush="{x:Null}" Foreground="#FFBAAFAD" FontSize="36" HorizontalContentAlignment="Left" Height="89"/>
<Button x:Name="Food_But" Content="food" HorizontalAlignment="Left" Margin="23,366,0,0" VerticalAlignment="Top" Width="413" BorderBrush="{x:Null}" Foreground="#FFBAAFAD" FontSize="36" HorizontalContentAlignment="Left" Height="89"/>
<Button x:Name="Dyes_But" Content="dyes" HorizontalAlignment="Left" Margin="23,455,0,0" VerticalAlignment="Top" Width="413" BorderBrush="{x:Null}" Foreground="#FFBAAFAD" FontSize="36" HorizontalContentAlignment="Left" Height="89"/>
<Button x:Name="About_But" Content="about this app" HorizontalAlignment="Left" Margin="23,544,0,0" VerticalAlignment="Top" Width="413" BorderBrush="{x:Null}" Foreground="#FF5F903F" FontSize="20" HorizontalContentAlignment="Left" Height="89"/>
</Grid>
</ScrollViewer>
我正在使用Visual Studio 2013
由于
答案 0 :(得分:0)
我认为您的滚动查看器超出了屏幕范围(高度)。它也发生在我身上。在您的设计视图中查看滚动查看器是否超出可见区域。降低滚动查看器的高度,使其完全出现在可见屏幕中。
希望这会有所帮助。