Windows Phone 7列表框着色项目?

时间:2011-10-01 16:34:14

标签: windows-phone-7

有没有办法将列表框与htmlstring一起使用?

listbox.items.add("<font color='#efefef' size=2>asd</font>“);

1 个答案:

答案 0 :(得分:1)

不是原生的。但你可以这样做:

listbox.Items.Add(new TextBlock()
{
    Text = "Asd",
    Foreground = Color.FromArgb(0xff, 0xef, 0xef, 0xef),
    FontSize = 2,
});