Share via

MultiScaleImage.SubImages Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets the collection of MultiScaleSubImage objects within the multiresolution image that is used by the MultiScaleImage.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)


Public ReadOnly Property SubImages As ReadOnlyCollection(Of MultiScaleSubImage)
public ReadOnlyCollection<MultiScaleSubImage> SubImages { get; }

Property Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<MultiScaleSubImage>
The collection of MultiScaleSubImage objects within the multiresolution image that is used by the MultiScaleImage.


Dependency property identifier field: SubImagesProperty

If you want to work with a set of individual images, for example, if you want programmatically move individual images around the screen or filter your images, you will want to use a collection of images rather than a single high-resolution image. There are two basic things you need to do to work with a collection of images:

  1. You need to export your images as a collection rather than a single image. You can do this in Deep Zoom Composer. Make sure to check the Create Collection check box when you export your composition. Images within the collection you export are called sub images.

  2. You can access the sub images in a MultiScaleImage (individual MultiScaleSubImage objects) by using the SubImages property.


The following example shows how to get a list of sub images in a MultiScaleSubImage.

Private Function RandomizedListOfImages() As List(Of MultiScaleSubImage)
    Dim imageList As New List(Of MultiScaleSubImage)()
    Dim ranNum As New Random()

    ' Store List of sub images.
    For Each subImage As MultiScaleSubImage In MyMSI.SubImages

    Return imageList
End Function
private List<MultiScaleSubImage> RandomizedListOfImages()
    List<MultiScaleSubImage> imageList = new List<MultiScaleSubImage>();
    Random ranNum = new Random();

    // Store List of sub images.
    foreach (MultiScaleSubImage subImage in MyMSI.SubImages)

    return imageList;

The following example allows you to rearrange images in a grid pattern by manipulating all the MultiScaleSubImage objects in the collection. Click the Randomize Images button to see the effect.

Run this sample

Download this sample

Version Information


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.