Compile meida files into a separate assembly

1. Setup a WPF User Control Library project in VS2008, and remove the user control files.

2. Create a folder of “Resources”, underneath create folders of Images, Videos, Audios, and the like.

3. Stuff each subfolder with the corresponding media files. Make sure the Build Action of any of them is “Resource”.

4. Build the whole project, then you can the assembly containing the binary resources.

To access these binary resources,

1. Add the reference to the assembly into your project.

2. Reach the concrete resource by the URI of, for example, “/ResourceAssemblyName;component/Resources/Images/TheImage.png”. The URI of this formate can be consumed either in XAML or in procedural code.


~ by Martin on September 30, 2007.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: