There's little documentation for the UltraPictureBox and I expected it to allow pairing with an imageList control, as I've done with the UltraTree control. Can anyone spare a code example showing how to dynamically assign images (pictures contained in a .Net project) to an UltraPictureBox? Thanks.
Hello,
Have you been able to follow Brian's suggestion?
Please do not hesitate to contact us if you have any further questions.
UltraPictureBox exposes an Image property, and the ImageList component returns Image instances from its Images collection indexers, so you can assign an image from an ImageList like so:
UltraPictureBox pb = new UltraPictureBox();pb.Image = this.imageList.Images[0];
Note that each time you access the ImageList.ImageCollection indexer (as seen in this code example), you are actually causing a copy of the image to be made, which consumes GDI resources, so this should be done conservatively.