GoDiagram Web Reference
GoImage Class
Members 

An object that displays a image such as a bitmap or JPEG file.
Syntax
'Declaration
 
<SerializableAttribute()>
Public Class GoImage 
   Inherits GoObject
[SerializableAttribute()]
public class GoImage : GoObject 
Remarks

This GoObject is responsible for painting an Image. The ResourceManager, and Name properties are used by LoadImage in order to procure the actual Image that is painted. If you change any of these properties, LoadImage will be called again to find a new image.

When you set any of those properties, if AutoResizes is true (which is the default value), LoadImage will be called immediately to determine whether the new Image has a new Size, in order to resize this GoImage object to the Image's natural size. However, when AutoResizes is false, LoadImage will only get called when the Image property is needed by a call to Paint. Hence if you have a large diagram with many different Images to be shown, it is advantageous to have GoDiagram only load images on demand due to painting. You can achieve this effect by setting AutoResizes to false and by setting the GoObject.Size explicitly to the size that you want, before setting the Name property.

If Name is non-null and non-empty, this tries to display the correspondingly named Image in the ResourceManager. If ResourceManager is null, this uses the value of DefaultResourceManager instead. If no Image is found in any ResourceManager for the given name, the Name is treated as a URI to be gotten via a WebClient if NameIsUri is true, or as a file pathname for an image file stored on disk if NameIsUri is false.

Images loaded by LoadImage from a ResourceManager or from a file on disk or from the web are cached in a static/shared hash table. Future calls to LoadImage with the same source and name will just share the same Image. You can clear the whole cache by calling ClearCachedImages, or you can clear individual cache entries by calling one of the ClearCachedImage overloaded methods. Call UnloadImage to cause an individual GoImage to call LoadImage again the next time it needs to show an Image.

A newly constructed GoImage will get its initial value for ResourceManager from DefaultResourceManager.

Inheritance Hierarchy

System.Object
   Northwoods.GoWeb.GoObject
      Northwoods.GoWeb.GoImage
         Northwoods.GoWeb.GoNodeIcon

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoImage Members
Northwoods.GoWeb Namespace

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback