Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
背景を黒から URI の画像に変更しようとしています。周りを見回したところ、XAML コードの例しか見つかりませんでしたが、これをすべてプログラムで実行したい場合はどうすればよいでしょうか?
this.Background = new ImageBrush { ImageSource = new BitmapImage { UriSource = uri } };
「これ」がアプリのレイアウト ルートであり、ページまたは他のコントロールが Background を独自の背景でオーバーライドしないと仮定します。