ImageSource.FromResource Method

Definition

Overloads

FromResource(String, Assembly)

Creates a ImageSource from the specified resource in the specified source assembly.

FromResource(String, Type)

Creates a ImageSource from the specified resource in the specified source assembly.

FromResource(String, Assembly)

Creates a ImageSource from the specified resource in the specified source assembly.

public static Xamarin.Forms.ImageSource FromResource (string resource, System.Reflection.Assembly sourceAssembly = default);
static member FromResource : string * System.Reflection.Assembly -> Xamarin.Forms.ImageSource

Parameters

resource
String

The name of a valid image resource in sourceAssembly.

sourceAssembly
Assembly

The source assembly in which to search for the image.

Returns

ImageSource

Applies to

FromResource(String, Type)

Creates a ImageSource from the specified resource in the specified source assembly.

public static Xamarin.Forms.ImageSource FromResource (string resource, Type resolvingType);
static member FromResource : string * Type -> Xamarin.Forms.ImageSource

Parameters

resource
String

The name of a valid image resource in the assembly to which resolvingType belongs.

resolvingType
Type

A type from the assembly in which to look up the image resource with resource.

Returns

ImageSource

Applies to