我的wp7應用程序將從網絡中獲取一組圖像網址,數量未知5-20。我想把它們並排放置,用戶可以通過從右向左輕掃來看到它們,只是看到沒有選擇或任何東西。我設法將URL轉換爲圖像,但無法弄清楚如何放置和顯示在內容面板上。我嘗試了contentpanel.children.add(圖片),但它沒有工作並顯示一個圖像。我應該怎麼做?如何在Windows Phone 7上並排顯示圖像?
0
A
回答
1
有很多方法可以做到這一點。
這裏有一種方法:
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<StackPanel x:Name="mySP" Orientation="Horizontal" />
</ScrollViewer>
然後就是填充的StackPanel與圖像。
這是它填充設備(或模擬器)上的所有圖像。
var lib = new MediaLibrary();
foreach (var picture in lib.Pictures)
{
BitmapImage bi = new BitmapImage();
bi.SetSource(picture.GetImage());
mySP.Children.Add(new Image { Source = bi });
}
0
aziz,完美控制你是Silverlight Toolkit for Windows Phone 7的WrapPanel; 檢查這裏:http://silverlight.codeplex.com
相關問題
- 1. 如何在windows phone 7中顯示gif圖像?
- 2. 顯示UVC windows phone 7
- 3. windows phone 7上的圖像編輯
- 4. 如何在Windows Phone 7上顯示交通信息?
- 5. 如何在windows phone 7應用程序開發中動態顯示圖像?
- 6. 如何在Windows Phone 7 Silverlight應用程序中顯示DDS圖像?
- 7. 什麼控制用於在Windows Phone 7上顯示較大的圖像
- 8. 如何在Windows Phone上壓縮圖像
- 9. 的Webbrowser的Windows Phone不顯示圖像
- 10. 並排顯示圖像
- 11. 如何 - Windows Phone 7?
- 12. 如何在使用Ionic Framework時顯示在Windows Phone上捕獲的圖像?
- 13. Windows Phone 7列表框不顯示
- 14. 如何在Windows Phone 7中顯示嵌入表格的行?
- 15. 如何在windows phone 7中突出顯示焦點文本?
- 16. 如何在Windows Phone 7中顯示列表框中的項目?
- 17. 更新Windows Phone 7上的像素
- 18. 動態加載圖像 - Windows Phone 7的
- 19. 帶圖像的Windows Phone 7按鈕
- 20. Windows Phone 7的圖像陣列
- 21. Windows Phone中創建圖像陣列7
- 22. 如何在Windows Phone 7中發送帶有文本的圖像
- 23. 如何在Windows Phone 7中設置按鈕的點擊圖像?
- 24. 如何在Windows Phone 7中使用HttpWebRequest發佈多個圖像?
- 25. 需要在windows phone 7屏幕上顯示大量的文本
- 26. 我可以在Windows Phone 7上顯示FlowDocument(或等效)嗎?
- 27. 檢測屏幕鍵盤是否顯示在Windows Phone 7上
- 28. Windows Phone 7推送通知不顯示在我的電話上
- 29. 在windows phone 7中顯示一組縮略圖應用程序
- 30. 如何將位圖圖像轉換爲Windows Phone 7中的png?