2012-03-04 99 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