我每次設置圖像的網格,圖像不會出現,黑色的背景出現網格打開黑色
private void Clk_Enter(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
ImageBrush myBrush = new ImageBrush();
BitmapImage bi = new BitmapImage();
bi.UriSource = new Uri(@"C:\Users\Administrator\documents\visual studio 2012\Projects\HelloWorld\HelloWorld\Images\Backgrounds\wallpaper-2022265.jpg",UriKind.Absolute);
myBrush.ImageSource = bi;
mygrid.Background = myBrush;
}
不能找到這樣的方法「windows.UI.xaml.media.imaging。 bitmapimage'不包含'BeginInit'的定義 –
我假設你在Windows 8上這樣做?你應該更新標籤,因爲它有點不同。 –
是的,它在Windows 8上,如何更新標籤? –