0

I'm compiling some source (it's a wpf window) with codedom. Now I want to add some resources (images) without dropping the file first. Is that possible?

If yes, how? And how can i access the images within the new application?

On request some more detailed informations:

User can enter / select some data. After that, the user can click compile which creates a custom application (wpf).

Now I want to add some image resources at compiling, so that I can create a nicer GUI for the dynamic created application.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
Mek
  • 65
  • 1
  • 9

1 Answers1

1

Okay, i managed the problem finaly.

I converted the image to an byte array, then wrote a new Resource (with ResourceWriter) and finally (CompilerParameters)EmbeddedResources.Add.

In the created WPF Window I grab the array, convert it back to an BitmapImage and assign it to an image control.

Mek
  • 65
  • 1
  • 9