title | description | ms.assetid | keywords | topic_type | api_name | api_type | ms.topic | ms.date | api_location | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Image element (Windows Ribbon Framework) |
Represents an image. |
2c71bb16-93ac-484f-b81b-1b95842472b3 |
|
|
|
|
reference |
05/31/2018 |
Represents an image.
<Image
Source = "xs:anyURI"
MinDPI = "xs:positiveInteger"
Symbol = "xs:string"
Id = "xs:positiveInteger union xs:string">
child elements
</Image>
Attribute | Type | Required | Description |
---|---|---|---|
Id |
xs:positiveInteger union xs:string |
No |
The unique resource ID. The maximum length is 10 characters including optional leading zeros. |
MinDPI |
xs:positiveInteger |
No |
If MinDPI is omitted, the default value is 96. |
Source |
xs:anyURI |
No |
|
Symbol |
xs:string |
No |
The resource symbol for the image. |
Element | Description |
---|---|
Image.Source |
May occur at most once |
Element |
---|
Command.LargeHighContrastImages |
Command.LargeImages |
Command.SmallHighContrastImages |
Command.SmallImages |
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.
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>
- Minimum supported system: Windows 7
- Can be empty: No