0
我想知道什麼是最簡單的方式來顯示Windows Phone(7)應用程序,每隔幾秒會自動更改一些文本。是否有即時可用的控件,我可以簡單地綁定一個字符串列表,並且還在監聽用戶輸入以手動切換內容?Windows Phone的自動內容滑塊
我想過使用Telerik SlideView控件,但我不知道這是否支持自動切換內容。
我想知道什麼是最簡單的方式來顯示Windows Phone(7)應用程序,每隔幾秒會自動更改一些文本。是否有即時可用的控件,我可以簡單地綁定一個字符串列表,並且還在監聽用戶輸入以手動切換內容?Windows Phone的自動內容滑塊
我想過使用Telerik SlideView控件,但我不知道這是否支持自動切換內容。
的Telerik SlideView control不直接支持幻燈片模式,但它很容易添加一個...
(下面的代碼是從Telerik的例子應用所)
private DispatcherTimer playTimer;
public FirstLook()
{
this.playTimer = new DispatcherTimer();
this.playTimer.Interval = TimeSpan.FromSeconds(2);
this.playTimer.Tick += this.OnPlayTimerTick;
}
private void OnPlayTimerTick(object sender, EventArgs e)
{
this.slideView.MoveToNextItem();
}
private void OnPlayTap(object sender, GestureEventArgs e)
{
if (this.playTimer.IsEnabled)
{
this.StopSlideShow();
}
else
{
this.playTimer.Start();
this.buttonImage.Source = new BitmapImage(new Uri("Images/pause.png", UriKind.RelativeOrAbsolute));
}
}
private void StopSlideShow()
{
this.playTimer.Stop();
this.buttonImage.Source = new BitmapImage(new Uri("Images/play.png", UriKind.RelativeOrAbsolute));
}
The demo app is available on the Windows Phone Store,這表明了這一點。