Freigeben über


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)

Source:
ImageSource.cs
Source:
ImageSource.cs

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

public static Microsoft.Maui.Controls.ImageSource FromResource (string resource, System.Reflection.Assembly sourceAssembly = default);
static member FromResource : string * System.Reflection.Assembly -> Microsoft.Maui.Controls.ImageSource
Public Shared Function FromResource (resource As String, Optional sourceAssembly As Assembly = Nothing) As 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

Applies to

FromResource(String, Type)

Source:
ImageSource.cs
Source:
ImageSource.cs

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

public:
 static Microsoft::Maui::Controls::ImageSource ^ FromResource(System::String ^ resource, Type ^ resolvingType);
public static Microsoft.Maui.Controls.ImageSource FromResource (string resource, Type resolvingType);
static member FromResource : string * Type -> Microsoft.Maui.Controls.ImageSource
Public Shared Function FromResource (resource As String, resolvingType As Type) As 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

Applies to