Simply use a ScrollViewer
Vertical scrolling page example
<Page
x:Class="ecu_winiot.PageVentilation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ecu_winiot"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<ScrollViewer VerticalScrollMode="Enabled" VerticalScrollBarVisibility="Auto" HorizontalScrollMode="Disabled" >
<Grid Height="1735"> <!-- Height optional, if not present it will auto size based on contents (e.g. the image below) -->
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!-- BACKGROUND IMAGE -->
<Image x:Name="imgBackground" Source="Assets/MyImage.png" Stretch="UniformToFill" Grid.ColumnSpan="999" Grid.RowSpan="999"/>
</Grid>
</ScrollViewer>
</Page>
Programmatically scroll a page
Name your ScrollViewer and ensure scrolling is enabled
<ScrollViewer x:Name="PageScrollViewer" VerticalScrollMode="Enabled" VerticalScrollBarVisibility="Hidden" HorizontalScrollMode="Disabled" >
<Canvas x:Name="OurCanvas" Width="800" Height="1513">
The .cs code to scroll it
if (PageScrollViewer.VerticalOffset != 0)
{
//Scroll to top
PageScrollViewer.ChangeView(0, 0, 1); //horizontalOffset, verticalOffset, zoomFactor
}
else
{
//Scroll to bottom
PageScrollViewer.ChangeView(0, PageScrollViewer.ScrollableHeight, 1);
}
//verticalOffset:
// A value between 0 and ScrollableHeight that specifies the distance the content should be scrolled vertically.
More ScrollViewer resources
FOR MORE SEE SECTION: Scroll Viewer
