WPF
プロジェクトファイルのあるディレクトリにimageフォルダがあり、そのフォルダ内にtest.jpgがあるとした場合 ①ソリューションエクスプローラにimageフォルダを作成し、追加、既存の項目よりtest.jpgを入れる ②test.jpgファイルのプロパティでビルドアクショ…
Streamを使用するならResources.resxファイルに画像ファイルを埋め込んでおく必要性があまり感じない・・・。 これもゴチャゴチャしているので何とかなら無いものか System.Drawing.Bitmap gifBitmap = Properties.Resources.numericExpression01; // gif Me…
もっと簡単な方法があったのでメモ。 // Create source. BitmapImage bi = new BitmapImage(); bi.BeginInit(); bi.UriSource = new Uri("test.png", UriKind.Relative); bi.EndInit(); // Create the image element. Image simpleImage = new Image(); simp…