How can I add unknow number of images together?

Just a concept advice:

I may have some to 9 (or 12) images to put on a Canvas.

I can drop them all at once, so I know how many of them they are. Their names ends with a number (.1 thru .n).

I am locked on how I place them correctly in a Final Picture…

As an example:

Or any combination of the above.

Height of each image is the same.
Width of each Row is the same.

Ideas ?

I may use the Windows Graphics to draw the images, so I do not have to deal with unknow canvas to be created… ?