C# windows phone 8中的自动滚动视图
我有一个图像滚动视图,我从远程服务器导入图像,但我想自动滚动图像,请帮助我如何自动滚动图像 图像滚动视图的我的xaml代码C# windows phone 8中的自动滚动视图,c#,windows-phone-8,C#,Windows Phone 8,我有一个图像滚动视图,我从远程服务器导入图像,但我想自动滚动图像,请帮助我如何自动滚动图像 图像滚动视图的我的xaml代码 <ScrollViewer x:Name="ImgScrollViewer" ScrollViewer.HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" > <StackPanel Orie
<ScrollViewer x:Name="ImgScrollViewer"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto" >
<StackPanel Orientation="Horizontal" x:Name="ImagesSP"
ScrollViewer.ManipulationMode="Control"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Height="124" Width="3690"
Loaded="ImagesSP_Loaded_1" >
<!--<StackPanel.RenderTransform>
<TranslateTransform Y="550"/>
</StackPanel.RenderTransform-->
<Image Source="http://technomindtech.com/1tele-pixel.com/ad/logo_banner.jpg" Width="500" Height="45" Stretch="Fill" VerticalAlignment="Top" />
<Image Source="http://technomindtech.com/1tele-pixel.com/ad/images.jpeg" Width="500" Height="45" Stretch="Fill" VerticalAlignment="Top" />
<Image Source="http://technomindtech.com/1tele-pixel.com/ad/banner.jpg" Width="500" Height="45" Stretch="Fill" VerticalAlignment="Top" />
<Image Source="http://technomindtech.com/1tele-pixel.com/ad/images.jpeg" Width="500" Height="45" Stretch="Fill" VerticalAlignment="Top" />
<Image Source="Images\MediumGray.png" Width="480" Height="400" Stretch="Fill" />
</StackPanel>
</ScrollViewer>
您需要计算要滚动到的偏移量,然后使用
ScrollToVerticalOffset(您的\u offset\u值)
方法。现在,计算偏移量的方式取决于您想要实现的具体目标,因此需要更多的细节来回答这个问题。您需要计算要滚动到的偏移量,然后使用ScrollToVerticalOffset(您的偏移量值)
方法。现在,如何计算偏移取决于您想要实现的目标,因此需要更多的细节来回答这个问题
namespace BogheApp
{
public partial class MainPage : BasePage
{
public MainPage()
{
InitializeComponent();
}
private void ImagesSP_Loaded_1(object sender, RoutedEventArgs e)
{
}
}
}