2012-03-04 163 views
0

我使用Silverlight工具包中的HubTile控件,不知何故标题在我自己的应用程序中颠倒显示,但也在预览中显示。见下面的截图。Hubtile.Title颠倒

我生成从码瓦片后面,将其添加到控制WrapPanel:

BitmapImage bitmap = new BitmapImage(); 
bitmap.SetSource(stream); 

var hubtile = new HubTile() 
{ 
    Source = bitmap, 
    Height = AppConfig.TileHeight, 
    Width = AppConfig.TileWidth, 
    Background = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush, 
    Margin = new Thickness(5), 
    IsFrozen = true, 
    Title = "Lorem Ipsum" 
}; 

wpTiles.Children.Add(hubtile); 

enter image description here enter image description here

+0

这是由图像缺失引起的。 “Silverlight Toolkit”的源代码已公开发布,因此如果找不到解决方法,您可以修复此问题。 – Ku6opr 2012-03-04 09:55:35

+1

创建样式来执行此操作非常简单,请参阅:http://studentguru.gr/b/kokyri/archive/ 2011/12/03/hubtiles-with-transparent-images.aspx – 2012-03-08 08:11:43

回答

3

的倒置部分是瓷砖的背面。
这是可见的,因为你没有设置瓷砖前面的背景。

一定要设置瓷砖正面和背面的背景(不透明的东西)以避免这种情况。

+0

我使用带有透明背景的png作为源。有没有办法解决这个问题? – schwindelig 2012-03-04 14:28:04

+1

@Dave是的。使用不透明的图像。 – 2012-03-05 22:15:46