SPUtility.GetThemedImageUrl method
Gets the path to the themed version of an image, if applicable. If the current web is not themed or there is no context web, the original URL is returned. Furthermore, if originalUrl or themeKey is null or empty, the originalUrl is always returned.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetThemedImageUrl ( _
originalUrl As String, _
themeKey As String _
) As String
'Usage
Dim originalUrl As String
Dim themeKey As String
Dim returnValue As String
returnValue = SPUtility.GetThemedImageUrl(originalUrl, _
themeKey)
public static string GetThemedImageUrl(
string originalUrl,
string themeKey
)
Parameters
originalUrl
Type: System.StringThe original URL to the image. Must be a server-relative path.
themeKey
Type: System.StringThe theme key passed into the ReplaceColor theming annotation.
Return value
Type: System.String
A server-relative URL to the themed image, or the original URL.