Share via


Utility.GetImage Method

Definition

Overloads

GetImage(String, ImageResources)

Retrieves an image from CRM resources or a URL.

GetImage(String, ImageResources, Boolean)

Retrieves an image from CRM resources or a URL

GetImage(String, ImageResources)

Retrieves an image from CRM resources or a URL.

public:
 static System::Windows::Controls::Image ^ GetImage(System::String ^ imagePath, Microsoft::Xrm::Tooling::WebResourceUtility::ImageResources ^ crmWebResource);
public static System.Windows.Controls.Image GetImage (string imagePath, Microsoft.Xrm.Tooling.WebResourceUtility.ImageResources crmWebResource);
static member GetImage : string * Microsoft.Xrm.Tooling.WebResourceUtility.ImageResources -> System.Windows.Controls.Image
Public Shared Function GetImage (imagePath As String, crmWebResource As ImageResources) As Image

Parameters

imagePath
String

Specifies the URL or the name of the web resource.

crmWebResource
ImageResources

Specifies the Web Resource utility object

Returns

Cached version of the image if it exists.

Applies to

GetImage(String, ImageResources, Boolean)

Retrieves an image from CRM resources or a URL

public:
 static System::Windows::Controls::Image ^ GetImage(System::String ^ imagePath, Microsoft::Xrm::Tooling::WebResourceUtility::ImageResources ^ crmWebResource, bool useCache);
public static System.Windows.Controls.Image GetImage (string imagePath, Microsoft.Xrm.Tooling.WebResourceUtility.ImageResources crmWebResource, bool useCache);
static member GetImage : string * Microsoft.Xrm.Tooling.WebResourceUtility.ImageResources * bool -> System.Windows.Controls.Image
Public Shared Function GetImage (imagePath As String, crmWebResource As ImageResources, useCache As Boolean) As Image

Parameters

imagePath
String

Specifies the URL or the name of the web resource.

crmWebResource
ImageResources

Specifies the Web Resource utility object.

useCache
Boolean

Specifies whether to use image cache or not. If true, cached version of the image will be returned. Otherwise, the image will be retrieved every time from the source.

Returns

Cached version of the image if it exists.

Applies to