Export (0) Print
Expand All

Image element

Represents an image.

Usage

<Image
  Source = "xs:anyURI"
  MinDPI = "xs:positiveInteger"
  Symbol = "xs:string"
  Id = "xs:positiveInteger union xs:string">
  child elements
</Image>

Attributes

AttributeTypeRequiredDescription

Id

xs:positiveInteger union xs:string

No

The unique resource ID.

(The union of xs:positiveInteger and xs:string)

An integer value between 2 and 59999, inclusive, or 0x2 and 0xea5f in hexadecimal, inclusive.

The maximum length is 10 characters including optional leading zeros.

MinDPI

xs:positiveInteger

No

(xs:positiveInteger)

Any sequence of digits with a minimum value of 96.

If MinDPI is omitted, the default value is 96.

Source

xs:anyURI

No

(xs:anyURI)

Any sequence of characters that represents a URI. The URI value is an absolute or relative (to the Ribbon markup file) path to an image resource of type BMP.

Symbol

xs:string

No

The resource symbol for the image.

(xs:string)

A string composed of a letter or underscore followed by any sequence of letters, digits, or underscores up to a maximum of 100 characters.

Child elements

ElementDescription

Image.Source

May occur at most once

Parent elements

Element

Command.LargeHighContrastImages

Command.LargeImages

Command.SmallHighContrastImages

Command.SmallImages

Remarks

Optional.

May occur one or more times for each Command.SmallImages, Command.SmallHighContrastImages, Command.LargeImages, or Command.LargeHighContrastImages element.

When a collection of image resources that are designed to support specific screen dots per inch (dpi) settings is supplied to the Ribbon framework through a set of Image elements, the framework uses the Image with a MinDPI attribute value that matches the current screen dpi setting.

If no Image element is declared with a MinDPI value that matches the current screen dpi setting, the framework picks the Image that has the nearest MinDPI value less than the current screen dpi setting and scales the image resource up. Otherwise, if no Image element is declared with a MinDPI attribute value less than the current screen dpi setting, the framework picks the nearest MinDPI value greater than the current screen dpi setting and scales the image resource down.

Examples

The following code example shows the markup required to declare, through a set of Image elements, a collection of image resources that are designed to support four specific screen dpi settings.


<Command Name="cmdSizeAndColor" Symbol="IDR_CMD_SIZEANDCOLOR">
  <Command.LabelTitle>
    <String Id="250">Size and Color</String>
  </Command.LabelTitle>
  <Command.LargeImages>
    <Image Id="251" MinDPI="96">res/sizeAndColor_96.bmp</Image>
    <Image Id="252" MinDPI="120">res/sizeAndColor_120.bmp</Image>
    <Image Id="253" MinDPI="144">res/sizeAndColor_144.bmp</Image>
    <Image Id="254" MinDPI="192">res/sizeAndColor_192.bmp</Image>
  </Command.LargeImages>
</Command>


Element information

Minimum supported system

Windows 7
Can be emptyNo

See also

Specifying Ribbon Image Resources

 

 

Community Additions

ADD
Show:
© 2014 Microsoft