This is SUCH A PAIN IN THE ____.
I definitely want to use the SAME IMAGE from the SAME IMAGE FILE for both the toolbox and the design surface. Anything else is stupid.
To use the image in the toolbox via the ToolboxIconAttribute, the image has to be 1) a bmp, 2) have its build action be an "Embedded Resource" (pay attention here or look stupid).
However, WPF pack uri's CANNOT be used to find images whose build action is "Embedded Resource", only "Resource" files can be referred to via a pack:// Uri.
I also cannot add the images to the project as links and then set the build action differently (same physical image file but embedded twice, oh well) as you cannot link to the same file twice within the same project.
As I see it, I have three choices:
1) Try to set the designer icon via codebehind (a pain in the ____; not even sure if it will work)
2) Copypaste the images, perhaps as a pre-build step (omgwtf)
3) Completely reorganize the structure of the solution so that designers and activities live in different assemblies (really? reminds me of beta1 days and mixing workflow and wpf in the same assembly)
Is there any satisfactory solution for this?
View Complete Post