Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create some kind of editor in Windows Forms for XNA and I was wondering if there's anyway to do this:

Load content (known types, like Model/SpriteFont/Effect/Texture) through OpenFileDialog, then Process it to an *.xnb file and finally be able to add it to a datacontainer, so you can use it in an editor.

Is this possible, and since I only want to use known types that already have Importers/Processors - what is the best way to go about doing this?

Because for me, to just manually have to add content when later creating the game logic and having everything set up in the editor feels very static.

So simply put, I want to be able to load content and process it and later be able to store it so when I create a game using this I can add a DataContainer that I can change and add to in the editor as well as use in the game.

Doing Content.Load() 2000 times later in the game feels like a time waster.

share|improve this question
up vote 1 down vote accepted

Yes, this is possible. The starting point for this is the XNA WinForms 2 sample.

The documentation with that sample will explain how to process content within your application and load it. It is also the starting point for writing that content out as an XNB file (IIRC, the sample almost does this - you just have to modify it to write the output somewhere useful).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.