Hello,
I am using an ultraToolbarManager with various tools. I set the image for these tools to an image in a shared resource project linked to the project containing the toolbar. This provides designer access to the shared images. When I set the image, I can inspect the Designer code and the image is linked. (appearance57.Image = global:: my shared project.my resx file.imagefile.) When the project with the tool bar is built, all these linked resources are converted into embedded resources in the resx of the control. The shared resources are used to efficiently manage images and making local copies is not desirable. The images in a local Project.Resources.resx file will remain as links so the compile process seems to recognize local resx files but not resx files in another project.
Is there some way to prevent this behaviour that embeds the images in the local resx of the control? (Likely the easiest way to sandbox this is to set up two projects and manually edit the designer generated code to link to an image in the second project. Then build.)
Wendy
Hello Hristo,
I built a Sandbox project and you are correct in stating all the windows controls work the same way replacing the links with embedded resources.
I am not using Satellite Assemblies but simply putting the shared images in one project within the same solution and then linking to the resx files to provide WindowsForms Designer access to the files. This works well for setting the images in the Designer.
After various trial and error in the Sandbox, it appears the links are replaced with embedded resources when the reference to the SharedResource assembly is to a non-project directory. Changing this to a project directory resolves the behaviour and the links are maintained. Odd behaviour that the compiler can find the non-project based reference but the Code Generator does not. Anyway, using a Project based reference resolves the issues for all the form controls including the toolbar.
Thanks,
Hristo"] Hello, All windows form components work on this way. For example start new project, drag PictureBox to the from, add image, build the project and close it. Delete the image and open again VisualStudio, you will see that the PictureBox will have this image and you could browse it from the resx file of the form. For more information please review the following link: http://msdn.microsoft.com/en-us/library/7k989cfy%28v=vs.80%29.aspx Please pay attention to the “Resources in Satellite Assemblies” section, which I think is what you are need. The other approach which you could use is to assign your images at runtime. Please let me know if you have any further questions or if I am missing something.
All windows form components work on this way. For example start new project, drag PictureBox to the from, add image, build the project and close it. Delete the image and open again VisualStudio, you will see that the PictureBox will have this image and you could browse it from the resx file of the form. For more information please review the following link:
http://msdn.microsoft.com/en-us/library/7k989cfy%28v=vs.80%29.aspx
Please pay attention to the “Resources in Satellite Assemblies” section, which I think is what you are need.
The other approach which you could use is to assign your images at runtime.
Please let me know if you have any further questions or if I am missing something.