Share via


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
System.String

The name of a valid image resource in sourceAssembly.

sourceAssembly
System.Reflection.Assembly

The source assembly in which to search for the image.

Returns

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
System.String

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

resolvingType
System.Type

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

Returns

Applies to