2011-05-20 106 views
0

我想从代码更改WP7全景视图的背景图像。从c#代码设置全景视图的WP7背景图像

从XAML第一: -

<controls:Panorama Title="earth" Name="PanoObj"> 
    <controls:Panorama.Background> 
     <ImageBrush ImageSource="background.jpg" /> 
    </controls:Panorama.Background> 
</controls:Panorama> 

从代码方面,它是从做: -

$ this.PanoObj.Background //它接受的类型刷。

我真的不明白这是从XAML这是一个ImageBrush,但在代码它是刷机。 请帮我解决这个问题或者从ImageBrush转换到Brush。

感谢,

回答