GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoImage Class / LoadImage Method
In This Topic
    LoadImage Method
    In This Topic
    This method is responsible for getting an Image.
    Syntax
    public virtual Image LoadImage()

    Return Value

    An Image.
    Remarks

    The normal behavior is to try to use the Index value, if non-negative, to find an Image in the ImageList. If there is no ImageList, we try using the DefaultImageList.

    If the index value is negative, we use the Name to get an Image object from the ResourceManager. If there is no ResourceManager, we try using the DefaultResourceManager, and if that fails, we try treating the name as a filename.

    The resulting Image is normally cached by this object as the Image property. If it loads the image from a file, the file may remain locked until the image is garbage collected.

    If an exception occurs trying to load an image, the message is sent to trace listeners. Also, if ThrowsExceptions is true, the catch handler will rethrow the exception. If the Index is out-of-bounds for the ImageList, or if the Name is not found in the ResourceManager, this will fail silently--no exception is thrown.

    See Also