Export (0) Print
Expand All

MultiScaleSubImage Class

This class holds the properties for each sub-image within the MultiScaleImage.

System.Object
  System.Windows.DependencyObject
    System.Windows.Controls.MultiScaleSubImage

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

public sealed class MultiScaleSubImage : DependencyObject

The MultiScaleSubImage type exposes the following members.

  NameDescription
Public methodSupported by Silverlight for Windows PhoneMultiScaleSubImageInitializes a new instance of the MultiScaleSubImage class.
Top

  NameDescription
Public propertySupported by Silverlight for Windows PhoneAspectRatioGets the aspect ratio of the image used as the source of the MultiScaleSubImage. The aspect ratio is the width of the image divided by its height.
Public propertySupported by Silverlight for Windows PhoneDispatcherGets the Dispatcher this object is associated with. (Inherited from DependencyObject.)
Public propertyIdGets the Id of the image used as the source of the MultiScaleSubImage.
Public propertySupported by Silverlight for Windows PhoneOpacityGets or sets the degree of the MultiScaleSubImage opacity.
Public propertyOriginalPixelHeightGets the original height of the image to be displayed.
Public propertyOriginalPixelWidthGets the original width of the image to be displayed.
Public propertySupported by Silverlight for Windows PhoneViewportOriginGets or sets the top-left corner of the area of the image to be displayed.
Public propertySupported by Silverlight for Windows PhoneViewportWidthGets or sets the width of the area of the image displayed.
Public propertySupported by Silverlight for Windows PhoneZIndexGets or sets a value that represents the z-order rendering behavior of the MultiScaleSubImage. Z-order determines the relative rendering order of objects (which object is on top of which other objects).
Top

  NameDescription
Public methodSupported by Silverlight for Windows PhoneCheckAccessDetermines whether the calling thread has access to this object. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneClearValueClears the local value of a dependency property. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetAnimationBaseValueReturns any base value established for a Silverlight dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetValueReturns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.)
Protected methodSupported by Silverlight for Windows PhoneMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneReadLocalValueReturns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneSetValueSets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public fieldStatic memberSupported by Silverlight for Windows PhoneAspectRatioPropertyIdentifies the AspectRatio dependency property.
Public fieldStatic memberIdPropertyIdentifies the Id dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneOpacityPropertyIdentifies the Opacity dependency property.
Public fieldStatic memberOriginalPixelHeightPropertyIdentifies the OriginalPixelHeight dependency property.
Public fieldStatic memberOriginalPixelWidthPropertyIdentifies the OriginalPixelWidth dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneViewportOriginPropertyIdentifies the ViewportOrigin dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneViewportWidthPropertyIdentifies the ViewportWidth dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneZIndexPropertyIdentifies the ZIndex dependency property.
Top

If you want to work with a set of individual images, for example, 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 do this:

  1. You need to export your images as a collection rather than a single image. You can do this in Deep Zoom Composer. Just make sure to check the "Create Collection" checkbox 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) you created in step 1 by using the SubImages property.

XAML usage for this class is technically possible but is not shown, because a XAML usage does not serve a purpose in any existing Silverlight content model. The subimages are the result of processing of an image set by a tool, and are not created in pure markup. Typically, you interact with this class by getting the value of MultiScaleImage.SubImages. It is possible to apply a XAML defined style to MultiScaleImage properties.

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


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)
    {
        imageList.Add(subImage);
    }

    return imageList;
}


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

Run this sample

Download this sample

Silverlight

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

Show:
© 2014 Microsoft