嗨,我是窗口手機7的新手,我有問題的應用樣式在列表框中替換行顏色在Windows Phone 7中。請幫助我。如何在列表框中應用交替行樣式在手機7
回答
雖然WPF有一個支持這個屬性的ALternationCount
屬性,但Web版本和WP7都沒有。在Silverlight中創建這種效果的最簡單方法是通過值轉換器設置項目的背景顏色。請參閱以下主題:
http://forums.silverlight.net/forums/t/14345.aspx – 2011-06-06 05:45:46
嗨每個人我都從下面的鏈接得到的解決方案 http://forums.silverlight.net/forums/t/14345.aspx – 2011-06-06 05:46:50
酷 - 你有沒有把上面的回答作爲答案? – ColinE 2011-06-06 05:49:48
private void Item_LayoutRoot_Loaded(object sender, RoutedEventArgs e)
{
StackPanel ItemRef = sender as StackPanel; // get the reference to the control
SolidColorBrush brush1 = new SolidColorBrush(Color.FromArgb(0,0,0,0)); //base colour
SolidColorBrush brush2 = new SolidColorBrush(Color.FromArgb(255,255,0,0)); //alternate colour
if (_useAlternate)
ItemRef.Background = brush1;
else
ItemRef.Background = brush2;
_useAlternate = !_useAlternate;
}
- 1. 在表中交替排列樣式
- 2. 如何向WhistlerBlue添加交替行樣式列表查看
- 3. 交替行的背景顏色列表框行7
- 4. 在jQuery手機選擇列表上手動觸發樣式
- 5. 如何在asp.net中設置交替行的樣式mvc
- 6. 交替錶行樣式位運算符
- 7. 如何在Silverlight/Windows Phone 7中統一重複列表框的樣式
- 8. 添加在我的Windows手機搜索框7應用程序
- 9. Gridview中的交替行樣式
- 10. 如何在手機應用程序中實現手風琴列表?
- 11. 如何在.NET中使用perl樣式替換表達式
- 12. 如何刪除Windows 7手機上的列表框中的項目?
- 13. 在TabContainers中對GridView應用交替行樣式的更有效方法
- 14. 如何在CSS中的段落之間交替樣式?
- 15. 如何在<ItemTemplate>(.NET)中獲得交替樣式?
- 16. Wpf樣式:在列表框中設置樣式
- 17. 如何手動將特定樣式表中的樣式應用於元素?
- 18. 如何在Windows手機上創建列表框和鏈接
- 19. 如何在Android手機中嵌入字體樣式?
- 20. 在c#中的grideview +模板上設置交替行樣式
- 21. jQuery手機CSS樣式不應用在下劃線模板
- 22. 在PrimeNG對話框中應用樣式
- 23. 如何在運行時在Silverlight中的Childwindow中應用樣式?
- 24. 邊框不適應列表樣式:無;
- 25. 懸停在gridview行覆蓋交替行樣式
- 26. 如何在wiindows手機7中使用休息wcf服務?
- 27. jQuery手機:輸入不在jquery手機樣式
- 28. 在Windows手機上實現本地列表框的搜索功能7
- 29. 如何在GtkTreeView中交替亮/黑行?
- 30. 如何在PHPExcel中應用樣式
您應該發佈一些您有故障代碼,並解釋實際問題。 [看到這裏提出了很好的問題](http://tinyurl.com/so-hints)。 – pickypg 2011-06-06 05:00:59
@Vijay Chavda:你可以提供你用於在windows phone app中爲行應用替代顏色的代碼嗎? – nkchandra 2012-12-06 11:35:11