SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Christian Hornung

Windows.Forms Designer Project Resource Support

As of SharpDevelop 3.0 build 3534, the integrated Windows.Forms designer supports project resources for images and icons. Especially, this means that forms generated by Visual Studio that use such resources can now be loaded and modified in SharpDevelop.

In earlier versions of SharpDevelop, when adding an image or icon to a control the only possibility was to import an image file which was then stored in the resource file of the form. This also meant that an image was often stored in the resources multiple times, for every single control where it was used.

In the new build, you will now see the following dialog when you click on the dots to edit an image property of a control:

The "local resource" option in combination with the "Import" button lets you do what the earlier versions did: Import a file and store it in the resources of the form.

The new "project resource" option, however, lets you choose a suitable image resource from any resource file in the current project that does not already belong to a form. This way, resources can be reused and maintained more efficiently.

Adding this feature required a lot of complex coding, including creating custom code serializers and deserializers, and getting this right is sometimes more like a game of pure chance, because the internals of the forms designer in the .NET framework are documented poorly. So, please feel free to test this feature thoroughly and report any problems in the forums.


No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this ( email address.