Sitecore 5.0 API

MainUtil.ThemedImage Method (String, ImageDimension)

Gets a themed image path.

[Visual Basic]
Overloads Public Shared Function ThemedImage( _
   ByVal sImage As String, _
   ByVal dimension As ImageDimension _
) As String
[C#]
public static string ThemedImage(
   string sImage,
   ImageDimension dimension
);

Parameters

sImage
Image file name.
dimension
Dimensions of the image.

Return Value

A path the the themed image.

Remarks

The function takes in account the current desktop theme. If the name of the image contains a size part, the size part is changed according to the dimensions.

Example

  string image = MainUtil.ThemedImage("save20x20.gif", ImageDimension.id32x32);
  // "/sitecore/client/themes/standard/save32x32.gif"

See Also

MainUtil Class | Sitecore Namespace | MainUtil.ThemedImage Overload List