ImageSource.FromResource Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.