ImageSource.FromResource ImageSource.FromResource Method

Definition

Overloads

FromResource(String, Assembly) FromResource(String, Assembly)

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

FromResource(String, Type) FromResource(String, Type)

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

FromResource(String, 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 = null);
static member FromResource : string * System.Reflection.Assembly -> Xamarin.Forms.ImageSource
Parameters
resource
String String

The name of a valid image resource in sourceAssembly.

sourceAssembly
Assembly Assembly

The source assembly in which to search for the image.

Returns

FromResource(String, Type) 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 String

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

resolvingType
Type Type

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

Returns

Applies to