Hi James -
One alternative is to write the embedded resource to a temporary location on disk, then pass that path to the ActiveView control using the DisplayURL property. You can delete the file when you're done with it, based on the needs of your application. The following code writes an embedded display to local storage, then sets the DisplayURL property to that path:
string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "embedded.pdi");
string resourceName = "EmbeddedResource.embedded.pdi";
using (FileStream fileStream = File.OpenWrite(path))
using (Stream resourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
int bytesRead = 0;
int bufferSize = (int)Math.Pow(2, 10);
byte buffer = new byte[bufferSize];
while (0 < (bytesRead = resourceStream.Read(buffer, 0, bufferSize)))
fileStream.Write(buffer, 0, bytesRead);
activeViewControl.DisplayURL = path;
For the sake of other readers who may not be familiar with embedded resources - the resourceName property may not be what you expect. This code is based on a resource that was embedded at the root of the project and therefore uses the root namespace of the project. If you are unsure what the full name of the resource will be at runtime, use the Assembly.GetManifestResourceNames method to get a list of names that you can pass to the GetManifestResourceStream method.
Just curious - have you weighed other methods of deploying your displays such as central file storage or on a web server that can be reached by your application?